Fossil

Check-in [da48c10d]
Login

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

Overview
Comment: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.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:da48c10d66d7f7b6a28d9d5e183f85327c19c623
User & Date: drh 2010-01-31 17:44:27
Context
2010-01-31
20:29
If the REPOSITORY argument to the "server" or "http" commands is a directory, then use the first element of PATH_INFO as the basename of a repository in that directory. check-in: 9cd2c42e user: drh tags: trunk
17:44
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. check-in: da48c10d user: drh tags: trunk
2010-01-30
15:32
In addition to ticket [9195b1e5f3] and commit [b8d812efb9], this adds the -A|--admin-user options to the clone command. check-in: d3e38231 user: jeremy_c tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/update.c.

76
77
78
79
80
81
82

83
84
85
86
87
88
89
..
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
  vid = db_lget_int("checkout", 0);
  if( vid==0 ){
    fossil_fatal("cannot find current version");
  }
  if( db_exists("SELECT 1 FROM vmerge") ){
    fossil_fatal("cannot update an uncommitted merge");
  }


  if( g.argc>=3 ){
    if( strcmp(g.argv[2], "current")==0 ){
      /* If VERSION is "current", then use the same algorithm to find the
      ** target as if VERSION were omitted. */
    }else if( strcmp(g.argv[2], "latest")==0 ){
      /* If VERSION is "latest", then use the same algorithm to find the
................................................................................
      if( tid==0 ){
        fossil_fatal("no such version: %s", g.argv[2]);
      }else if( !is_a_version(tid) ){
        fossil_fatal("no such version: %s", g.argv[2]);
      }
    }
  }
  if( !nochangeFlag ) autosync(AUTOSYNC_PULL);
  
  if( tid==0 ){
    compute_leaves(vid, 1);
    if( !latestFlag && db_int(0, "SELECT count(*) FROM leaves")>1 ){
      db_prepare(&q, 
        "%s "
        "   AND event.objid IN leaves"







>







 







<







76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
..
96
97
98
99
100
101
102

103
104
105
106
107
108
109
  vid = db_lget_int("checkout", 0);
  if( vid==0 ){
    fossil_fatal("cannot find current version");
  }
  if( db_exists("SELECT 1 FROM vmerge") ){
    fossil_fatal("cannot update an uncommitted merge");
  }
  if( !nochangeFlag ) autosync(AUTOSYNC_PULL);

  if( g.argc>=3 ){
    if( strcmp(g.argv[2], "current")==0 ){
      /* If VERSION is "current", then use the same algorithm to find the
      ** target as if VERSION were omitted. */
    }else if( strcmp(g.argv[2], "latest")==0 ){
      /* If VERSION is "latest", then use the same algorithm to find the
................................................................................
      if( tid==0 ){
        fossil_fatal("no such version: %s", g.argv[2]);
      }else if( !is_a_version(tid) ){
        fossil_fatal("no such version: %s", g.argv[2]);
      }
    }
  }

  
  if( tid==0 ){
    compute_leaves(vid, 1);
    if( !latestFlag && db_int(0, "SELECT count(*) FROM leaves")>1 ){
      db_prepare(&q, 
        "%s "
        "   AND event.objid IN leaves"