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.
Commit
da48c10d66d7f7b6a28d9d5e183f85327c19c623
Parent
d3e38231f2bf9be…
1 file changed
+1
-1
+1
-1
| --- src/update.c | ||
| +++ src/update.c | ||
| @@ -78,10 +78,11 @@ | ||
| 78 | 78 | fossil_fatal("cannot find current version"); |
| 79 | 79 | } |
| 80 | 80 | if( db_exists("SELECT 1 FROM vmerge") ){ |
| 81 | 81 | fossil_fatal("cannot update an uncommitted merge"); |
| 82 | 82 | } |
| 83 | + if( !nochangeFlag ) autosync(AUTOSYNC_PULL); | |
| 83 | 84 | |
| 84 | 85 | if( g.argc>=3 ){ |
| 85 | 86 | if( strcmp(g.argv[2], "current")==0 ){ |
| 86 | 87 | /* If VERSION is "current", then use the same algorithm to find the |
| 87 | 88 | ** target as if VERSION were omitted. */ |
| @@ -97,11 +98,10 @@ | ||
| 97 | 98 | }else if( !is_a_version(tid) ){ |
| 98 | 99 | fossil_fatal("no such version: %s", g.argv[2]); |
| 99 | 100 | } |
| 100 | 101 | } |
| 101 | 102 | } |
| 102 | - if( !nochangeFlag ) autosync(AUTOSYNC_PULL); | |
| 103 | 103 | |
| 104 | 104 | if( tid==0 ){ |
| 105 | 105 | compute_leaves(vid, 1); |
| 106 | 106 | if( !latestFlag && db_int(0, "SELECT count(*) FROM leaves")>1 ){ |
| 107 | 107 | db_prepare(&q, |
| 108 | 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 | |
| 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 |