cwdiff icon indicating copy to clipboard operation
cwdiff copied to clipboard

Headers output separate from their diff...

Open wesalvaro opened this issue 7 years ago • 4 comments

moving the print out into the diff header line case (out of the else) fixed it for the most part.

wesalvaro avatar Jun 25 '18 07:06 wesalvaro

Do you have an example of what you would except vs. what you got?

junghans avatar Jun 25 '18 13:06 junghans

Ping @wesalvaro

junghans avatar Jul 25 '18 11:07 junghans

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.

wesalvaro avatar Jul 30 '18 01:07 wesalvaro

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.

hop avatar Jul 28 '22 22:07 hop