# HG changeset patch # User Patrick Mezard # Date 1343560436 -7200 # Node ID 1be4ea4f3c0db853cc97420bfc41c4bdee5f813a # Parent 92bd7b3678ea443bf3d63cd0e89324de9ff96e4d 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. diff --git a/hgsubversion/stupid.py b/hgsubversion/stupid.py --- a/hgsubversion/stupid.py +++ b/hgsubversion/stupid.py @@ -271,8 +271,8 @@ def diff_branchrev(ui, svn, meta, branch 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,