Fossil SCM

When applying a patch, if the file rename fails, make that just a warning not a fatal error, as the warning might be due to file renames on a prior merge. Fix for ticket [21037bfc1296dabc].

drh 2023-01-02 16:12 trunk
Commit f013384605144a4a16db4e22ce304ef7bd5ff4ae2d59a03be16ebc2e2d2fbecc
1 file changed +2 -2
+2 -2
--- src/patch.c
+++ src/patch.c
@@ -496,12 +496,12 @@
496496
if( mFlags & PATCH_DRYRUN ){
497497
fossil_print("%s", blob_str(&cmd));
498498
}else{
499499
int rc = fossil_unsafe_system(blob_str(&cmd));
500500
if( rc ){
501
- fossil_fatal("unable to rename files:\n%s",
502
- blob_str(&cmd));
501
+ fossil_print("%-10s unable to rename files:\n%s", "WARNING!",
502
+ blob_str(&cmd));
503503
}
504504
}
505505
blob_reset(&cmd);
506506
}
507507
508508
--- src/patch.c
+++ src/patch.c
@@ -496,12 +496,12 @@
496 if( mFlags & PATCH_DRYRUN ){
497 fossil_print("%s", blob_str(&cmd));
498 }else{
499 int rc = fossil_unsafe_system(blob_str(&cmd));
500 if( rc ){
501 fossil_fatal("unable to rename files:\n%s",
502 blob_str(&cmd));
503 }
504 }
505 blob_reset(&cmd);
506 }
507
508
--- src/patch.c
+++ src/patch.c
@@ -496,12 +496,12 @@
496 if( mFlags & PATCH_DRYRUN ){
497 fossil_print("%s", blob_str(&cmd));
498 }else{
499 int rc = fossil_unsafe_system(blob_str(&cmd));
500 if( rc ){
501 fossil_print("%-10s unable to rename files:\n%s", "WARNING!",
502 blob_str(&cmd));
503 }
504 }
505 blob_reset(&cmd);
506 }
507
508

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button