Mercurial > hgsubversion
changeset 920:1be4ea4f3c0d
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.
author | Patrick Mezard <patrick@mezard.eu> |
---|---|
date | Sun, 29 Jul 2012 13:13:56 +0200 |
parents | 92bd7b3678ea |
children | 8faa91951bb1 |
files | hgsubversion/stupid.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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,