Fossil SCM
Make the merge command behave as if --cherrypick were passed in if merge is invoked with the name cherry-pick, per [forum:/forumpost/7ca2e5dc4c | forum post 7ca2e5dc4c] and /chat discussion. Fixed an unrelated internal doc typo.
Commit
0421108812a73ca16acd929f5485360f5d21ff2a72e94e00b4a633e7f8a43d56
Parent
a36cddb453114de…
2 files changed
+6
-1
+1
-1
+6
-1
| --- src/merge.c | ||
| +++ src/merge.c | ||
| @@ -274,20 +274,22 @@ | ||
| 274 | 274 | } |
| 275 | 275 | |
| 276 | 276 | |
| 277 | 277 | /* |
| 278 | 278 | ** COMMAND: merge |
| 279 | +** COMMAND: cherry-pick | |
| 279 | 280 | ** |
| 280 | 281 | ** Usage: %fossil merge ?OPTIONS? ?VERSION? |
| 281 | 282 | ** |
| 282 | 283 | ** The argument VERSION is a version that should be merged into the |
| 283 | 284 | ** current checkout. All changes from VERSION back to the nearest |
| 284 | 285 | ** common ancestor are merged. Except, if either of the --cherrypick or |
| 285 | 286 | ** --backout options are used only the changes associated with the |
| 286 | 287 | ** single check-in VERSION are merged. The --backout option causes |
| 287 | 288 | ** the changes associated with VERSION to be removed from the current |
| 288 | -** checkout rather than added. | |
| 289 | +** checkout rather than added. When invoked with the name cherry-pick, | |
| 290 | +** this command works exactly like merge --cherrypick. | |
| 289 | 291 | ** |
| 290 | 292 | ** If the VERSION argument is omitted, then Fossil attempts to find |
| 291 | 293 | ** a recent fork on the current branch to merge. |
| 292 | 294 | ** |
| 293 | 295 | ** Only file content is merged. The result continues to use the |
| @@ -364,10 +366,13 @@ | ||
| 364 | 366 | forceMissingFlag = find_option("force-missing",0,0)!=0; |
| 365 | 367 | if( !verboseFlag ){ |
| 366 | 368 | verboseFlag = find_option("detail",0,0)!=0; /* deprecated */ |
| 367 | 369 | } |
| 368 | 370 | pickFlag = find_option("cherrypick",0,0)!=0; |
| 371 | + if(0==fossil_strcmp("cherry-pick", g.zCmdName)){ | |
| 372 | + pickFlag = 1; | |
| 373 | + } | |
| 369 | 374 | integrateFlag = find_option("integrate",0,0)!=0; |
| 370 | 375 | backoutFlag = find_option("backout",0,0)!=0; |
| 371 | 376 | zBinGlob = find_option("binary",0,1); |
| 372 | 377 | dryRunFlag = find_option("dry-run","n",0)!=0; |
| 373 | 378 | if( !dryRunFlag ){ |
| 374 | 379 |
| --- src/merge.c | |
| +++ src/merge.c | |
| @@ -274,20 +274,22 @@ | |
| 274 | } |
| 275 | |
| 276 | |
| 277 | /* |
| 278 | ** COMMAND: merge |
| 279 | ** |
| 280 | ** Usage: %fossil merge ?OPTIONS? ?VERSION? |
| 281 | ** |
| 282 | ** The argument VERSION is a version that should be merged into the |
| 283 | ** current checkout. All changes from VERSION back to the nearest |
| 284 | ** common ancestor are merged. Except, if either of the --cherrypick or |
| 285 | ** --backout options are used only the changes associated with the |
| 286 | ** single check-in VERSION are merged. The --backout option causes |
| 287 | ** the changes associated with VERSION to be removed from the current |
| 288 | ** checkout rather than added. |
| 289 | ** |
| 290 | ** If the VERSION argument is omitted, then Fossil attempts to find |
| 291 | ** a recent fork on the current branch to merge. |
| 292 | ** |
| 293 | ** Only file content is merged. The result continues to use the |
| @@ -364,10 +366,13 @@ | |
| 364 | forceMissingFlag = find_option("force-missing",0,0)!=0; |
| 365 | if( !verboseFlag ){ |
| 366 | verboseFlag = find_option("detail",0,0)!=0; /* deprecated */ |
| 367 | } |
| 368 | pickFlag = find_option("cherrypick",0,0)!=0; |
| 369 | integrateFlag = find_option("integrate",0,0)!=0; |
| 370 | backoutFlag = find_option("backout",0,0)!=0; |
| 371 | zBinGlob = find_option("binary",0,1); |
| 372 | dryRunFlag = find_option("dry-run","n",0)!=0; |
| 373 | if( !dryRunFlag ){ |
| 374 |
| --- src/merge.c | |
| +++ src/merge.c | |
| @@ -274,20 +274,22 @@ | |
| 274 | } |
| 275 | |
| 276 | |
| 277 | /* |
| 278 | ** COMMAND: merge |
| 279 | ** COMMAND: cherry-pick |
| 280 | ** |
| 281 | ** Usage: %fossil merge ?OPTIONS? ?VERSION? |
| 282 | ** |
| 283 | ** The argument VERSION is a version that should be merged into the |
| 284 | ** current checkout. All changes from VERSION back to the nearest |
| 285 | ** common ancestor are merged. Except, if either of the --cherrypick or |
| 286 | ** --backout options are used only the changes associated with the |
| 287 | ** single check-in VERSION are merged. The --backout option causes |
| 288 | ** the changes associated with VERSION to be removed from the current |
| 289 | ** checkout rather than added. When invoked with the name cherry-pick, |
| 290 | ** this command works exactly like merge --cherrypick. |
| 291 | ** |
| 292 | ** If the VERSION argument is omitted, then Fossil attempts to find |
| 293 | ** a recent fork on the current branch to merge. |
| 294 | ** |
| 295 | ** Only file content is merged. The result continues to use the |
| @@ -364,10 +366,13 @@ | |
| 366 | forceMissingFlag = find_option("force-missing",0,0)!=0; |
| 367 | if( !verboseFlag ){ |
| 368 | verboseFlag = find_option("detail",0,0)!=0; /* deprecated */ |
| 369 | } |
| 370 | pickFlag = find_option("cherrypick",0,0)!=0; |
| 371 | if(0==fossil_strcmp("cherry-pick", g.zCmdName)){ |
| 372 | pickFlag = 1; |
| 373 | } |
| 374 | integrateFlag = find_option("integrate",0,0)!=0; |
| 375 | backoutFlag = find_option("backout",0,0)!=0; |
| 376 | zBinGlob = find_option("binary",0,1); |
| 377 | dryRunFlag = find_option("dry-run","n",0)!=0; |
| 378 | if( !dryRunFlag ){ |
| 379 |
+1
-1
| --- src/repolist.c | ||
| +++ src/repolist.c | ||
| @@ -256,11 +256,11 @@ | ||
| 256 | 256 | db_open_repository(zSkinRepo); |
| 257 | 257 | fossil_free(zSkinRepo); |
| 258 | 258 | fossil_free(zSkinUrl); |
| 259 | 259 | } |
| 260 | 260 | if( g.repositoryOpen ){ |
| 261 | - /* This case runs if remote_repository_info() found a repository | |
| 261 | + /* This case runs if remote_repo_info() found a repository | |
| 262 | 262 | ** that has the "repolist_skin" property set to non-zero and left |
| 263 | 263 | ** that repository open in g.db. Use the skin of that repository |
| 264 | 264 | ** for display. */ |
| 265 | 265 | login_check_credentials(); |
| 266 | 266 | style_set_current_feature("repolist"); |
| 267 | 267 |
| --- src/repolist.c | |
| +++ src/repolist.c | |
| @@ -256,11 +256,11 @@ | |
| 256 | db_open_repository(zSkinRepo); |
| 257 | fossil_free(zSkinRepo); |
| 258 | fossil_free(zSkinUrl); |
| 259 | } |
| 260 | if( g.repositoryOpen ){ |
| 261 | /* This case runs if remote_repository_info() found a repository |
| 262 | ** that has the "repolist_skin" property set to non-zero and left |
| 263 | ** that repository open in g.db. Use the skin of that repository |
| 264 | ** for display. */ |
| 265 | login_check_credentials(); |
| 266 | style_set_current_feature("repolist"); |
| 267 |
| --- src/repolist.c | |
| +++ src/repolist.c | |
| @@ -256,11 +256,11 @@ | |
| 256 | db_open_repository(zSkinRepo); |
| 257 | fossil_free(zSkinRepo); |
| 258 | fossil_free(zSkinUrl); |
| 259 | } |
| 260 | if( g.repositoryOpen ){ |
| 261 | /* This case runs if remote_repo_info() found a repository |
| 262 | ** that has the "repolist_skin" property set to non-zero and left |
| 263 | ** that repository open in g.db. Use the skin of that repository |
| 264 | ** for display. */ |
| 265 | login_check_credentials(); |
| 266 | style_set_current_feature("repolist"); |
| 267 |