Fossil SCM
Always associate -wiki FILE with the check-in, never the branch, per /chat discussion.
Commit
e6ce6186172373a45dfd910b7af4409fbc3778bd7bc80b87721b8b6154d0b043
Parent
033412b16346dba…
1 file changed
+3
-9
+3
-9
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -2535,12 +2535,11 @@ | ||
| 2535 | 2535 | ** --tag TAG-NAME Add TAG-NAME to the check-in. May be repeated. |
| 2536 | 2536 | ** --trace Debug tracing |
| 2537 | 2537 | ** --user-override USER Record USER as the login that created the |
| 2538 | 2538 | ** new check-in, rather that the current user. |
| 2539 | 2539 | ** -w|--wiki FILE Adds FILE's content as a wiki page associated |
| 2540 | -** with this check-in or, if used with --branch, | |
| 2541 | -** the branch. | |
| 2540 | +** with this check-in. | |
| 2542 | 2541 | ** --wm|--wiki-mimetype TYPE Mimetype for --wiki-file. Default is from the |
| 2543 | 2542 | ** file extension: .md=markdown, .wiki=fossil, |
| 2544 | 2543 | ** otherwise plain text. Accepts "markdown", |
| 2545 | 2544 | ** "wiki", and "plain" as aliases. |
| 2546 | 2545 | ** |
| @@ -3318,11 +3317,11 @@ | ||
| 3318 | 3317 | fossil_fatal("working check-out before and after commit does not match"); |
| 3319 | 3318 | } |
| 3320 | 3319 | } |
| 3321 | 3320 | |
| 3322 | 3321 | if( zWikiFile ){ |
| 3323 | - /* Handle --wiki-file and --wiki-mimetype */ | |
| 3322 | + /* Handle --wiki and --wiki-mimetype */ | |
| 3324 | 3323 | Blob bWiki = BLOB_INITIALIZER; |
| 3325 | 3324 | char * zPageName; |
| 3326 | 3325 | int parentRid = 0; |
| 3327 | 3326 | blob_read_from_file(&bWiki, zWikiFile, ExtFILE); |
| 3328 | 3327 | if( !zWikiMime ){ |
| @@ -3332,16 +3331,11 @@ | ||
| 3332 | 3331 | zWikiMime = "text/x-fossil-wiki"; |
| 3333 | 3332 | }else{ |
| 3334 | 3333 | zWikiMime = "text/plain"; |
| 3335 | 3334 | } |
| 3336 | 3335 | } |
| 3337 | - if( sCiInfo.zBranch ){ | |
| 3338 | - zPageName = mprintf("branch/%s", sCiInfo.zBranch); | |
| 3339 | - wiki_fetch_by_name(zPageName, 0, &parentRid, 0); | |
| 3340 | - }else{ | |
| 3341 | - zPageName = mprintf("checkin/%s", zUuid); | |
| 3342 | - } | |
| 3336 | + zPageName = mprintf("checkin/%s", zUuid); | |
| 3343 | 3337 | zWikiMime = wiki_filter_mimetypes(zWikiMime); |
| 3344 | 3338 | wiki_cmd_commit(zPageName, parentRid, &bWiki, zWikiMime, 1); |
| 3345 | 3339 | fossil_print("Added %s (%s)\n", zPageName, zWikiMime); |
| 3346 | 3340 | blob_reset(&bWiki); |
| 3347 | 3341 | fossil_free(zPageName); |
| 3348 | 3342 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -2535,12 +2535,11 @@ | |
| 2535 | ** --tag TAG-NAME Add TAG-NAME to the check-in. May be repeated. |
| 2536 | ** --trace Debug tracing |
| 2537 | ** --user-override USER Record USER as the login that created the |
| 2538 | ** new check-in, rather that the current user. |
| 2539 | ** -w|--wiki FILE Adds FILE's content as a wiki page associated |
| 2540 | ** with this check-in or, if used with --branch, |
| 2541 | ** the branch. |
| 2542 | ** --wm|--wiki-mimetype TYPE Mimetype for --wiki-file. Default is from the |
| 2543 | ** file extension: .md=markdown, .wiki=fossil, |
| 2544 | ** otherwise plain text. Accepts "markdown", |
| 2545 | ** "wiki", and "plain" as aliases. |
| 2546 | ** |
| @@ -3318,11 +3317,11 @@ | |
| 3318 | fossil_fatal("working check-out before and after commit does not match"); |
| 3319 | } |
| 3320 | } |
| 3321 | |
| 3322 | if( zWikiFile ){ |
| 3323 | /* Handle --wiki-file and --wiki-mimetype */ |
| 3324 | Blob bWiki = BLOB_INITIALIZER; |
| 3325 | char * zPageName; |
| 3326 | int parentRid = 0; |
| 3327 | blob_read_from_file(&bWiki, zWikiFile, ExtFILE); |
| 3328 | if( !zWikiMime ){ |
| @@ -3332,16 +3331,11 @@ | |
| 3332 | zWikiMime = "text/x-fossil-wiki"; |
| 3333 | }else{ |
| 3334 | zWikiMime = "text/plain"; |
| 3335 | } |
| 3336 | } |
| 3337 | if( sCiInfo.zBranch ){ |
| 3338 | zPageName = mprintf("branch/%s", sCiInfo.zBranch); |
| 3339 | wiki_fetch_by_name(zPageName, 0, &parentRid, 0); |
| 3340 | }else{ |
| 3341 | zPageName = mprintf("checkin/%s", zUuid); |
| 3342 | } |
| 3343 | zWikiMime = wiki_filter_mimetypes(zWikiMime); |
| 3344 | wiki_cmd_commit(zPageName, parentRid, &bWiki, zWikiMime, 1); |
| 3345 | fossil_print("Added %s (%s)\n", zPageName, zWikiMime); |
| 3346 | blob_reset(&bWiki); |
| 3347 | fossil_free(zPageName); |
| 3348 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -2535,12 +2535,11 @@ | |
| 2535 | ** --tag TAG-NAME Add TAG-NAME to the check-in. May be repeated. |
| 2536 | ** --trace Debug tracing |
| 2537 | ** --user-override USER Record USER as the login that created the |
| 2538 | ** new check-in, rather that the current user. |
| 2539 | ** -w|--wiki FILE Adds FILE's content as a wiki page associated |
| 2540 | ** with this check-in. |
| 2541 | ** --wm|--wiki-mimetype TYPE Mimetype for --wiki-file. Default is from the |
| 2542 | ** file extension: .md=markdown, .wiki=fossil, |
| 2543 | ** otherwise plain text. Accepts "markdown", |
| 2544 | ** "wiki", and "plain" as aliases. |
| 2545 | ** |
| @@ -3318,11 +3317,11 @@ | |
| 3317 | fossil_fatal("working check-out before and after commit does not match"); |
| 3318 | } |
| 3319 | } |
| 3320 | |
| 3321 | if( zWikiFile ){ |
| 3322 | /* Handle --wiki and --wiki-mimetype */ |
| 3323 | Blob bWiki = BLOB_INITIALIZER; |
| 3324 | char * zPageName; |
| 3325 | int parentRid = 0; |
| 3326 | blob_read_from_file(&bWiki, zWikiFile, ExtFILE); |
| 3327 | if( !zWikiMime ){ |
| @@ -3332,16 +3331,11 @@ | |
| 3331 | zWikiMime = "text/x-fossil-wiki"; |
| 3332 | }else{ |
| 3333 | zWikiMime = "text/plain"; |
| 3334 | } |
| 3335 | } |
| 3336 | zPageName = mprintf("checkin/%s", zUuid); |
| 3337 | zWikiMime = wiki_filter_mimetypes(zWikiMime); |
| 3338 | wiki_cmd_commit(zPageName, parentRid, &bWiki, zWikiMime, 1); |
| 3339 | fossil_print("Added %s (%s)\n", zPageName, zWikiMime); |
| 3340 | blob_reset(&bWiki); |
| 3341 | fossil_free(zPageName); |
| 3342 |