Fossil

Check-in [badb9ff2]
Login

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

Overview
Comment:Change the name of the special "ckout" tag to "current". Also allow "previous" in addition to "prev" for the parent of the current checkout.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: badb9ff2311ef3e21edd305cb64ea0324efe54d4
User & Date: drh 2010-11-11 23:08:39
Context
2010-11-12
00:24
Added documentation on ways to identify a check-in. check-in: aaf8cfa2 user: drh tags: trunk
2010-11-11
23:08
Change the name of the special "ckout" tag to "current". Also allow "previous" in addition to "prev" for the parent of the current checkout. check-in: badb9ff2 user: drh tags: trunk
22:04
Add support for "magic" tags "ckout", "prev" and "next". Show the version updating to when performing an "update". check-in: 5ea9ad37 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/name.c.

190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
        "  FROM event, blob"
        " WHERE event.type='ci'"
        "   AND blob.rid=event.objid"
        " ORDER BY event.mtime DESC"
      );
    }
    if( zUuid==0 && g.localOpen && (vid=db_lget_int("checkout",0))!=0 ){
      if( strcmp(zTag, "ckout")==0 ){
        zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", vid);
      }else if( strcmp(zTag, "prev")==0 ){
        zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid="
                           "(SELECT pid FROM plink WHERE cid=%d AND isprim)",
                           vid);
      }else if( strcmp(zTag, "next")==0 ){
        zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid="
                           "(SELECT cid FROM plink WHERE pid=%d AND isprim"
                           "  ORDER BY mtime DESC)",







|

|







190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
        "  FROM event, blob"
        " WHERE event.type='ci'"
        "   AND blob.rid=event.objid"
        " ORDER BY event.mtime DESC"
      );
    }
    if( zUuid==0 && g.localOpen && (vid=db_lget_int("checkout",0))!=0 ){
      if( strcmp(zTag, "current")==0 ){
        zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", vid);
      }else if( strcmp(zTag, "prev")==0 || strcmp(zTag, "previous")==0 ){
        zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid="
                           "(SELECT pid FROM plink WHERE cid=%d AND isprim)",
                           vid);
      }else if( strcmp(zTag, "next")==0 ){
        zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid="
                           "(SELECT cid FROM plink WHERE pid=%d AND isprim"
                           "  ORDER BY mtime DESC)",