Patrick Mézard avatar Patrick Mézard committed 1be4ea4

stupid: diff with the good revision when restoring branch

Converting history like:

r1 create trunk
r2 remove trunk
r3 make some unrelated commit
r4 restore trunk from r2

stupid mode would retrieve and apply the diff with r3 instead of the
one with r2. All the code deciding r2 is the actual parent was already
there, only the revision argument was not passed.

This fixes:
- test_delete_restore_trunk in comprehensive/
- test_delete_restore_trunk_stupid in comprehensive/

Tested on OSX 10.6 with macports svn-1.7.5. I can no longer test with

Comments (0)

Files changed (1)


         if prev is None or pbranch == branch:
             # letting patch handle binaries sounded
             # cool, but it breaks patch in sad ways
-            d = svn.get_unified_diff(branchpath, r.revnum, deleted=False,
-                                     ignore_type=False)
+            d = svn.get_unified_diff(branchpath, r.revnum,                                                           other_rev=prev,
+                                     deleted=False, ignore_type=False)
             d = svn.get_unified_diff(branchpath, r.revnum,
                                      other_path=ppath, other_rev=prev,
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.