Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:When doing a "fossil update" if there are multiple descendents but only one descendent in the same branch as current, then go to that one descendent without complaining. Ticket [33d2bf39889352f2f]
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:4beacb6dc4721bf10faf3b1eb3c691a51ffdd4f0
User & Date: drh 2010-12-14 00:30:53
Context
2010-12-14
00:36
Merge in the experimental clone speed enhancement. check-in: 3543ed62 user: drh tags: trunk
00:30
When doing a "fossil update" if there are multiple descendents but only one descendent in the same branch as current, then go to that one descendent without complaining. Ticket [33d2bf39889352f2f] check-in: 4beacb6d user: drh tags: trunk
00:15
Do not show a hex dump by default when viewing a binary artifact. Instead, just say that the artifact contains binary data and give a "Hex" submenu to view the hex if that is what the user wants. Ticket [a470443b64412d2856]. check-in: dbb02ff1 user: drh tags: trunk
Changes

Changes to src/update.c.

94
95
96
97
98
99
100

101
102



103










104
105
106
107
108
109
110
111
112

113
114
115
116
117
118
119
      }else if( !is_a_version(tid) ){
        fossil_fatal("no such version: %s", g.argv[2]);
      }
    }
  }
  
  if( tid==0 ){

    compute_leaves(vid, 1);
    if( !db_exists("SELECT 1 FROM leaves") ) compute_leaves(vid, 0);



    if( !latestFlag && db_int(0, "SELECT count(*) FROM leaves")>1 ){










      db_prepare(&q, 
        "%s "
        "   AND event.objid IN leaves"
        " ORDER BY event.mtime DESC",
        timeline_query_for_tty()
      );
      print_timeline(&q, 100);
      db_finalize(&q);
      fossil_fatal("Multiple descendants");

    }
    tid = db_int(0, "SELECT rid FROM leaves, event"
                    " WHERE event.objid=leaves.rid"
                    " ORDER BY event.mtime DESC"); 
  }

  if( !verboseFlag && (tid==vid)) return;  /* Nothing to update */







>
|
|
>
>
>

>
>
>
>
>
>
>
>
>
>
|
|
|
|
|
|
|
|
|
>







94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
      }else if( !is_a_version(tid) ){
        fossil_fatal("no such version: %s", g.argv[2]);
      }
    }
  }
  
  if( tid==0 ){
    int closeCode = 1;
    compute_leaves(vid, closeCode);
    if( !db_exists("SELECT 1 FROM leaves") ){
      closeCode = 0;
      compute_leaves(vid, closeCode);
    }
    if( !latestFlag && db_int(0, "SELECT count(*) FROM leaves")>1 ){
      db_multi_exec(
        "DELETE FROM leaves WHERE rid NOT IN"
        "   (SELECT leaves.rid FROM leaves, tagxref"
        "     WHERE leaves.rid=tagxref.rid AND tagxref.tagid=%d"
        "       AND tagxref.value==(SELECT value FROM tagxref"
                                   " WHERE tagid=%d AND rid=%d))",
        TAG_BRANCH, TAG_BRANCH, vid
      );
      if( db_int(0, "SELECT count(*) FROM leaves")>1 ){
        compute_leaves(vid, closeCode);
        db_prepare(&q, 
          "%s "
          "   AND event.objid IN leaves"
          " ORDER BY event.mtime DESC",
          timeline_query_for_tty()
        );
        print_timeline(&q, 100);
        db_finalize(&q);
        fossil_fatal("Multiple descendants");
      }
    }
    tid = db_int(0, "SELECT rid FROM leaves, event"
                    " WHERE event.objid=leaves.rid"
                    " ORDER BY event.mtime DESC"); 
  }

  if( !verboseFlag && (tid==vid)) return;  /* Nothing to update */