Fossil

Check-in [999b1779]
Login

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

Overview
Comment:Make use of the is_a_version() function to check for valid version IDs in the checkout command. Ticket [2de4ae605844fe3f].
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 999b1779e71ed659e7b962ae96905bd9a6a5dcc6
User & Date: drh 2009-10-31 13:11:35
References
2009-10-31
13:12 Fixed ticket [2de4ae60]: 'checkout' command fail after merge without changes. plus 2 other changes artifact: f41861e1 user: drh
Context
2009-10-31
13:23
Remove the extra space character before filenames in web directory listings. Ticket [28d861eb5799a60] check-in: 4165033b user: drh tags: trunk
13:11
Make use of the is_a_version() function to check for valid version IDs in the checkout command. Ticket [2de4ae605844fe3f]. check-in: 999b1779 user: drh tags: trunk
2009-10-27
20:15
Make "revert" complain about excess arguments. Ticket [36d5fbf9a4]. check-in: 107f38dd user: eric tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/checkout.c.

71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
  if( name_to_uuid(&uuid, 1) ){
    fossil_panic(g.zErrMsg);
  }
  vid = db_int(0, "SELECT rid FROM blob WHERE uuid=%B", &uuid);
  if( vid==0 ){
    fossil_fatal("no such check-in: %s", g.argv[2]);
  }
  if( !db_exists("SELECT 1 FROM mlink WHERE mid=%d", vid) ){
    fossil_fatal("object [%.10s] is not a check-in", blob_str(&uuid));
  }
  load_vfile_from_rid(vid);
  return vid;
}

/*







|







71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
  if( name_to_uuid(&uuid, 1) ){
    fossil_panic(g.zErrMsg);
  }
  vid = db_int(0, "SELECT rid FROM blob WHERE uuid=%B", &uuid);
  if( vid==0 ){
    fossil_fatal("no such check-in: %s", g.argv[2]);
  }
  if( !is_a_version(vid) ){
    fossil_fatal("object [%.10s] is not a check-in", blob_str(&uuid));
  }
  load_vfile_from_rid(vid);
  return vid;
}

/*