7

When I have a lot of small changes across multiple files in a Suversion source folder, it is convenient to look at the changes via one big unified diff file. To be clear, a unified diff file, as produced by subversion, looks like this (example contains the diffs from two files, the diffs all appear in same .diff file):

Index: file1.py
===================================================================
--- file1.py    (revision 2)
+++ file1.py    (working copy)
@@ -227,7 +229,7 @@
         some line of code
         some other line of code
         yet a third line of code
-        first change, left
+        first change, right
         some line of code
         some other line of code
         yet a third line of code
@@ -608,8 +610,8 @@
         some line of code
         some other line of code
         yet a third line of code
-##         second change, left
-##         third change, left
+        second change, right
+        third change, right
         some line of code
         some other line of code
         yet a third line of code
\ No newline at end of file
Index: file2.py
===================================================================
--- file2.py    (revision 3)
+++ file2.py    (working copy)
@@ -3607,22 +3630,22 @@
         some line of code
         some other line of code
         yet a third line of code
-##         first change, left
-##         second change, left
+        first change, right
+        second change, right
         some line of code
         some other line of code
         yet a third line of code
@@ -7988,7 +8011,7 @@
         some line of code
         some other line of code
         yet a third line of code
-        third change, left
+        third change, right
         some line of code
         some other line of code
         yet a third line of code

As you can imagine, if there are lots of similar changes across multiple files, it is very convenient to look at this in tortoiseudiff (note the "u" in name) since it color-codes the changes and you can quickly scan them. However, tortoiseudiff shows this file as it is (plus some syntax highlighting): the "left" and "right" side of the diff are sequenced vertically rather than side by side. It would be even better to see the two sides of each diff block side by side rather than above/below. Something like this:

Index: file1.py
===================================================================
--- file1.py    (revision 2)
+++ file1.py    (working copy)
@@ -227,7 +229,7 @@
    some line of code                      some line of code
    some other line of code                some other line of code
    yet a third line of code               yet a third line of code
-   first change, left                 +   first change, right
    some line of code                      some line of code
    some other line of code                some other line of code
    yet a third line of code               yet a third line of code
@@ -608,8 +610,8 @@
    some line of code                      some line of code
    some other line of code                some other line of code
    yet a third line of code               yet a third line of code
-##         second change, left
-##         third change, left
+        second change, right
+        third change, right
    some line of code                      some line of code
    some other line of code                some other line of code
    yet a third line of code               yet a third line of code
\ No newline at end of file
Index: file2.py
===================================================================
--- file2.py    (revision 3)
+++ file2.py    (working copy)
@@ -3607,22 +3630,22 @@
    some line of code                      some line of code
    some other line of code                some other line of code
    yet a third line of code               yet a third line of code
-##   first change, left             +     first change, right
-##   second change, left            +     second change, right
    some line of code                      some line of code
    some other line of code                some other line of code
    yet a third line of code               yet a third line of code
@@ -7988,7 +8011,7 @@
    some line of code                      some line of code
    some other line of code                some other line of code
    yet a third line of code               yet a third line of code
-   third change, left                 +   third change, right
    some line of code                      some line of code
    some other line of code                some other line of code
    yet a third line of code               yet a third line of code

or even better this:

Index: file1.py
===================================================================
--- file1.py    (revision 2)
+++ file1.py    (working copy)
@@ -227,7 +229,7 @@
                     some line of code
                     some other line of code
                     yet a third line of code
-        first change, left             +        first change, right
                     some line of code
                     some other line of code
                     yet a third line of code
@@ -608,8 +610,8 @@
                     some line of code
                     some other line of code
                     yet a third line of code
-##         second change, left         +        second change, right
-##         third change, left          +        third change, right
                     some line of code
                     some other line of code
                     yet a third line of code
\ No newline at end of file
Index: file2.py
===================================================================
--- file2.py    (revision 3)
+++ file2.py    (working copy)
@@ -3607,22 +3630,22 @@
                     some line of code
                     some other line of code
                     yet a third line of code
-##         first change, left          +        first change, right
-##         second change, left         +        second change, right
                     some line of code
                     some other line of code
                     yet a third line of code
@@ -7988,7 +8011,7 @@
                     some line of code
                     some other line of code
                     yet a third line of code
-        third change, left             +        third change, right
                     some line of code
                     some other line of code
                     yet a third line of code

I'm on MS Windows so I looked at winmerge, tortoiseudiff, tortoiseidff, none support this. I have searched on the web for other options but no luck.

Anyone know of a tool that does this?

1 Answer 1

5

I think Beyond Compare does meet your needs. The folder comparison feature shows which files are different between two sets of folders and you can then select all files and generate a file differences report, which I think is what you want. Using a simple example, the GUI looks like this:

Beyond Compare folder comparison

and the report looks like this:

FILE COMPARISON
Produced: 15/05/2014 12:27:16

Mode:  All Lines
Left base folder: C:\Example
Right base folder: C:\Example2

File: Subfolder\File3.txt
1 Test         =  1 Test
2 Another test    2 Another test
----------------------------------------------
               -+ 3 Extra line
----------------------------------------------
3 More testing =  4 More testing
----------------------------------------------

File: File1.txt
1 Test         <> 1 Deleted line
                  2 Another modified line test
2 Another test    3 Extra line
----------------------------------------------
3 More testing =  4 More testing
----------------------------------------------

File: File2.txt
1 Test         =  1 Test
2 Another test    2 Another test
3 More testing    3 More testing
----------------------------------------------

In this example I've displayed all lines even if they are the same, but it is possible to filter to show only the changed lines if you want to. There is also a scripting interface if you didn't want to go through the GUI and a 30 day free trial.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.