Fossil SCM

When an external diff fails with non-0 fossil_system(), emit a warning which shows the external command it tried to invoke. This addressed [forum:4bad60805bfb2397|forum post 4bad60805bfb2397].

stephan 2025-03-17 12:21 trunk
Commit 45da184c1b7d6b6c968e1530779b94762dbdf21540e41189dc3e96f4350a7d65
1 file changed +4 -1
+4 -1
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -667,11 +667,14 @@
667667
blob_append_escaped_arg(&cmd, blob_str(&nameFile1), 1);
668668
blob_append_escaped_arg(&cmd, zFile2, 1);
669669
}
670670
671671
/* Run the external diff command */
672
- fossil_system(blob_str(&cmd));
672
+ if( fossil_system(blob_str(&cmd)) ){
673
+ fossil_warning("External diff command failed: %b\n",
674
+ &cmd);
675
+ }
673676
674677
/* Delete the temporary file and clean up memory used */
675678
if( useTempfile ) file_delete(blob_str(&nameFile1));
676679
blob_reset(&nameFile1);
677680
blob_reset(&cmd);
678681
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -667,11 +667,14 @@
667 blob_append_escaped_arg(&cmd, blob_str(&nameFile1), 1);
668 blob_append_escaped_arg(&cmd, zFile2, 1);
669 }
670
671 /* Run the external diff command */
672 fossil_system(blob_str(&cmd));
 
 
 
673
674 /* Delete the temporary file and clean up memory used */
675 if( useTempfile ) file_delete(blob_str(&nameFile1));
676 blob_reset(&nameFile1);
677 blob_reset(&cmd);
678
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -667,11 +667,14 @@
667 blob_append_escaped_arg(&cmd, blob_str(&nameFile1), 1);
668 blob_append_escaped_arg(&cmd, zFile2, 1);
669 }
670
671 /* Run the external diff command */
672 if( fossil_system(blob_str(&cmd)) ){
673 fossil_warning("External diff command failed: %b\n",
674 &cmd);
675 }
676
677 /* Delete the temporary file and clean up memory used */
678 if( useTempfile ) file_delete(blob_str(&nameFile1));
679 blob_reset(&nameFile1);
680 blob_reset(&cmd);
681

Keyboard Shortcuts

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