Fossil SCM
In the 'unsaved changes' error of the patch command, make it explicit that the patch cannot be applied (because it otherwise comes across as informational, not an error).
Commit
8c5faa368ff19b8b2888f8313b4f8d5fd0c1c691feb5091082fed68ed9bf809c
Parent
0a473cd5533f5bb…
1 file changed
+2
-1
+2
-1
| --- src/patch.c | ||
| +++ src/patch.c | ||
| @@ -384,11 +384,12 @@ | ||
| 384 | 384 | Blob cmd; |
| 385 | 385 | |
| 386 | 386 | blob_init(&cmd, 0, 0); |
| 387 | 387 | if( unsaved_changes(0) ){ |
| 388 | 388 | if( (mFlags & PATCH_FORCE)==0 ){ |
| 389 | - fossil_fatal("there are unsaved changes in the current check-out"); | |
| 389 | + fossil_fatal("Cannot apply patch: there are unsaved changes " | |
| 390 | + "in the current check-out"); | |
| 390 | 391 | }else{ |
| 391 | 392 | blob_appendf(&cmd, "%$ revert", g.nameOfExe); |
| 392 | 393 | if( mFlags & PATCH_DRYRUN ){ |
| 393 | 394 | fossil_print("%s\n", blob_str(&cmd)); |
| 394 | 395 | }else{ |
| 395 | 396 |
| --- src/patch.c | |
| +++ src/patch.c | |
| @@ -384,11 +384,12 @@ | |
| 384 | Blob cmd; |
| 385 | |
| 386 | blob_init(&cmd, 0, 0); |
| 387 | if( unsaved_changes(0) ){ |
| 388 | if( (mFlags & PATCH_FORCE)==0 ){ |
| 389 | fossil_fatal("there are unsaved changes in the current check-out"); |
| 390 | }else{ |
| 391 | blob_appendf(&cmd, "%$ revert", g.nameOfExe); |
| 392 | if( mFlags & PATCH_DRYRUN ){ |
| 393 | fossil_print("%s\n", blob_str(&cmd)); |
| 394 | }else{ |
| 395 |
| --- src/patch.c | |
| +++ src/patch.c | |
| @@ -384,11 +384,12 @@ | |
| 384 | Blob cmd; |
| 385 | |
| 386 | blob_init(&cmd, 0, 0); |
| 387 | if( unsaved_changes(0) ){ |
| 388 | if( (mFlags & PATCH_FORCE)==0 ){ |
| 389 | fossil_fatal("Cannot apply patch: there are unsaved changes " |
| 390 | "in the current check-out"); |
| 391 | }else{ |
| 392 | blob_appendf(&cmd, "%$ revert", g.nameOfExe); |
| 393 | if( mFlags & PATCH_DRYRUN ){ |
| 394 | fossil_print("%s\n", blob_str(&cmd)); |
| 395 | }else{ |
| 396 |