1. Arne Babenhauserheide
  2. hgsubversion

Commits

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_stupid_pull.py
- test_delete_restore_trunk_stupid in comprehensive/test_verify_and_startrev.py

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

  • Participants
  • Parent commits 92bd7b3
  • Branches default

Comments (0)

Files changed (1)

File hgsubversion/stupid.py

View file
  • Ignore whitespace
         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)
         else:
             d = svn.get_unified_diff(branchpath, r.revnum,
                                      other_path=ppath, other_rev=prev,