Fossil SCM
Fix a bug in [1ef6499a9af8] which caused resolution of certain builtin symbolic names to not resolve.
Commit
7faa1f4e23113872d352369864159641a2cac345e8f509ad81c5bfd088470467
Parent
0fd4bde73683c03…
1 file changed
+5
-2
+5
-2
| --- src/name.c | ||
| +++ src/name.c | ||
| @@ -434,15 +434,18 @@ | ||
| 434 | 434 | " WHERE type='ci'" |
| 435 | 435 | " ORDER BY event.mtime DESC" |
| 436 | 436 | ); |
| 437 | 437 | if( rid ) return rid; |
| 438 | 438 | } |
| 439 | + | |
| 440 | + if( g.localOpen ) { | |
| 441 | + ridCkout = db_lget_int("checkout",0); | |
| 442 | + } | |
| 439 | 443 | |
| 440 | 444 | /* special keywords: "prev", "previous", "current", "ckout", and |
| 441 | 445 | ** "next" */ |
| 442 | - if( (zType[0]=='*' || isCheckin!=0) | |
| 443 | - && 0>(ridCkout = db_lget_int("checkout",0)) ){ | |
| 446 | + if( (zType[0]=='*' || isCheckin!=0) && 0<ridCkout ){ | |
| 444 | 447 | if( fossil_strcmp(zTag, "current")==0 ){ |
| 445 | 448 | rid = ridCkout; |
| 446 | 449 | }else if( fossil_strcmp(zTag, "prev")==0 |
| 447 | 450 | || fossil_strcmp(zTag, "previous")==0 ){ |
| 448 | 451 | rid = db_int(0, "SELECT pid FROM plink WHERE cid=%d AND isprim", |
| 449 | 452 |
| --- src/name.c | |
| +++ src/name.c | |
| @@ -434,15 +434,18 @@ | |
| 434 | " WHERE type='ci'" |
| 435 | " ORDER BY event.mtime DESC" |
| 436 | ); |
| 437 | if( rid ) return rid; |
| 438 | } |
| 439 | |
| 440 | /* special keywords: "prev", "previous", "current", "ckout", and |
| 441 | ** "next" */ |
| 442 | if( (zType[0]=='*' || isCheckin!=0) |
| 443 | && 0>(ridCkout = db_lget_int("checkout",0)) ){ |
| 444 | if( fossil_strcmp(zTag, "current")==0 ){ |
| 445 | rid = ridCkout; |
| 446 | }else if( fossil_strcmp(zTag, "prev")==0 |
| 447 | || fossil_strcmp(zTag, "previous")==0 ){ |
| 448 | rid = db_int(0, "SELECT pid FROM plink WHERE cid=%d AND isprim", |
| 449 |
| --- src/name.c | |
| +++ src/name.c | |
| @@ -434,15 +434,18 @@ | |
| 434 | " WHERE type='ci'" |
| 435 | " ORDER BY event.mtime DESC" |
| 436 | ); |
| 437 | if( rid ) return rid; |
| 438 | } |
| 439 | |
| 440 | if( g.localOpen ) { |
| 441 | ridCkout = db_lget_int("checkout",0); |
| 442 | } |
| 443 | |
| 444 | /* special keywords: "prev", "previous", "current", "ckout", and |
| 445 | ** "next" */ |
| 446 | if( (zType[0]=='*' || isCheckin!=0) && 0<ridCkout ){ |
| 447 | if( fossil_strcmp(zTag, "current")==0 ){ |
| 448 | rid = ridCkout; |
| 449 | }else if( fossil_strcmp(zTag, "prev")==0 |
| 450 | || fossil_strcmp(zTag, "previous")==0 ){ |
| 451 | rid = db_int(0, "SELECT pid FROM plink WHERE cid=%d AND isprim", |
| 452 |