Fossil SCM

Run autosync before resolving the version name in the "update" command. In that way, if a branch is specified which has been extended by the sync, the latest version of that branch is extracted rather than the version that was latest prior to the sync.

drh 2010-01-31 17:44 trunk
Commit da48c10d66d7f7b6a28d9d5e183f85327c19c623
1 file changed +1 -1
+1 -1
--- src/update.c
+++ src/update.c
@@ -78,10 +78,11 @@
7878
fossil_fatal("cannot find current version");
7979
}
8080
if( db_exists("SELECT 1 FROM vmerge") ){
8181
fossil_fatal("cannot update an uncommitted merge");
8282
}
83
+ if( !nochangeFlag ) autosync(AUTOSYNC_PULL);
8384
8485
if( g.argc>=3 ){
8586
if( strcmp(g.argv[2], "current")==0 ){
8687
/* If VERSION is "current", then use the same algorithm to find the
8788
** target as if VERSION were omitted. */
@@ -97,11 +98,10 @@
9798
}else if( !is_a_version(tid) ){
9899
fossil_fatal("no such version: %s", g.argv[2]);
99100
}
100101
}
101102
}
102
- if( !nochangeFlag ) autosync(AUTOSYNC_PULL);
103103
104104
if( tid==0 ){
105105
compute_leaves(vid, 1);
106106
if( !latestFlag && db_int(0, "SELECT count(*) FROM leaves")>1 ){
107107
db_prepare(&q,
108108
--- src/update.c
+++ src/update.c
@@ -78,10 +78,11 @@
78 fossil_fatal("cannot find current version");
79 }
80 if( db_exists("SELECT 1 FROM vmerge") ){
81 fossil_fatal("cannot update an uncommitted merge");
82 }
 
83
84 if( g.argc>=3 ){
85 if( strcmp(g.argv[2], "current")==0 ){
86 /* If VERSION is "current", then use the same algorithm to find the
87 ** target as if VERSION were omitted. */
@@ -97,11 +98,10 @@
97 }else if( !is_a_version(tid) ){
98 fossil_fatal("no such version: %s", g.argv[2]);
99 }
100 }
101 }
102 if( !nochangeFlag ) autosync(AUTOSYNC_PULL);
103
104 if( tid==0 ){
105 compute_leaves(vid, 1);
106 if( !latestFlag && db_int(0, "SELECT count(*) FROM leaves")>1 ){
107 db_prepare(&q,
108
--- src/update.c
+++ src/update.c
@@ -78,10 +78,11 @@
78 fossil_fatal("cannot find current version");
79 }
80 if( db_exists("SELECT 1 FROM vmerge") ){
81 fossil_fatal("cannot update an uncommitted merge");
82 }
83 if( !nochangeFlag ) autosync(AUTOSYNC_PULL);
84
85 if( g.argc>=3 ){
86 if( strcmp(g.argv[2], "current")==0 ){
87 /* If VERSION is "current", then use the same algorithm to find the
88 ** target as if VERSION were omitted. */
@@ -97,11 +98,10 @@
98 }else if( !is_a_version(tid) ){
99 fossil_fatal("no such version: %s", g.argv[2]);
100 }
101 }
102 }
 
103
104 if( tid==0 ){
105 compute_leaves(vid, 1);
106 if( !latestFlag && db_int(0, "SELECT count(*) FROM leaves")>1 ){
107 db_prepare(&q,
108

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button