cwdiff
cwdiff copied to clipboard
Headers output separate from their diff...
moving the print out into the diff header line case (out of the else) fixed it for the most part.
Do you have an example of what you would except vs. what you got?
Ping @wesalvaro
I don't have any handy, but it was like this:
=== FILENAME_A
=== FILENAME_B
DIFF_A
DIFF_A
DIFF_A
DIFF_B
DIFF_B
DIFF_B
That kind of thing.
Here's an example:
$ hg diff
diff -r 64dde7a5ac8b bar
--- a/bar Thu Jul 28 23:47:41 2022 +0200
+++ b/bar Fri Jul 29 00:34:33 2022 +0200
@@ -1,1 +1,1 @@
-bar
+bary
diff -r 64dde7a5ac8b foo
--- a/foo Thu Jul 28 23:47:41 2022 +0200
+++ b/foo Fri Jul 29 00:34:33 2022 +0200
@@ -1,1 +1,1 @@
-foo
+foox
$ hg extdiff -p cwdiff -o -d
diff spam.64dde7a5ac8b/bar spam/bar
--- spam.64dde7a5ac8b/bar 2022-07-28 23:47:41.000000000 +0200
+++ spam/bar 2022-07-29 00:34:42.873833000 +0200
@@ -1 +1 @@
diff spam.64dde7a5ac8b/foo spam/foo
--- spam.64dde7a5ac8b/foo 2022-07-28 23:47:41.000000000 +0200
+++ spam/foo 2022-07-29 00:34:42.873833000 +0200
@@ -1 +1 @@
bar
foobary
foox
~~Seems to work as long as there is only one file changed.~~ Works for more complex diffs, even if more than one file is changed.