Fossil SCM
If the special "ckout" of the "/doc" webpage is used and the server is not within a local check-out, then automatically convert "ckout" to "tip".
Commit
292e585661b01026cf550a6000311947c64d4e75
Parent
f0e98310c13c961…
1 file changed
+3
+3
| --- src/doc.c | ||
| +++ src/doc.c | ||
| @@ -348,10 +348,13 @@ | ||
| 348 | 348 | zBaseline[i] = 0; |
| 349 | 349 | zName += i; |
| 350 | 350 | while( zName[0]=='/' ){ zName++; } |
| 351 | 351 | if( !file_is_simple_pathname(zName) ){ |
| 352 | 352 | goto doc_not_found; |
| 353 | + } | |
| 354 | + if( strcmp(zBaseline,"ckout")==0 && db_open_local()==0 ){ | |
| 355 | + strcpy(zBaseline,"tip"); | |
| 353 | 356 | } |
| 354 | 357 | if( strcmp(zBaseline,"ckout")==0 ){ |
| 355 | 358 | /* Read from the local checkout */ |
| 356 | 359 | char *zFullpath; |
| 357 | 360 | db_must_be_within_tree(); |
| 358 | 361 |
| --- src/doc.c | |
| +++ src/doc.c | |
| @@ -348,10 +348,13 @@ | |
| 348 | zBaseline[i] = 0; |
| 349 | zName += i; |
| 350 | while( zName[0]=='/' ){ zName++; } |
| 351 | if( !file_is_simple_pathname(zName) ){ |
| 352 | goto doc_not_found; |
| 353 | } |
| 354 | if( strcmp(zBaseline,"ckout")==0 ){ |
| 355 | /* Read from the local checkout */ |
| 356 | char *zFullpath; |
| 357 | db_must_be_within_tree(); |
| 358 |
| --- src/doc.c | |
| +++ src/doc.c | |
| @@ -348,10 +348,13 @@ | |
| 348 | zBaseline[i] = 0; |
| 349 | zName += i; |
| 350 | while( zName[0]=='/' ){ zName++; } |
| 351 | if( !file_is_simple_pathname(zName) ){ |
| 352 | goto doc_not_found; |
| 353 | } |
| 354 | if( strcmp(zBaseline,"ckout")==0 && db_open_local()==0 ){ |
| 355 | strcpy(zBaseline,"tip"); |
| 356 | } |
| 357 | if( strcmp(zBaseline,"ckout")==0 ){ |
| 358 | /* Read from the local checkout */ |
| 359 | char *zFullpath; |
| 360 | db_must_be_within_tree(); |
| 361 |