# HG changeset patch # User Patrick Mezard # Date 1225038388 -3600 # Node ID c4461ea8b4c8022568080ecc847ba4ed3e17906c # Parent 2fef3051ebb3e1b8997b8c5e053bc5de69ca5ed9 patch: fix patched files records in externalpatcher() diff -r 2fef3051ebb3 -r c4461ea8b4c8 mercurial/patch.py --- a/mercurial/patch.py Sun Oct 26 14:02:32 2008 +0100 +++ b/mercurial/patch.py Sun Oct 26 17:26:28 2008 +0100 @@ -1060,7 +1060,7 @@ if line.startswith('patching file '): pf = util.parse_patch_output(line) printed_file = False - files.setdefault(pf, (None, None)) + files.setdefault(pf, None) elif line.find('with fuzz') >= 0: fuzz = True if not printed_file: diff -r 2fef3051ebb3 -r c4461ea8b4c8 tests/test-import --- a/tests/test-import Sun Oct 26 14:02:32 2008 +0100 +++ b/tests/test-import Sun Oct 26 17:26:28 2008 +0100 @@ -20,6 +20,18 @@ hg --cwd b tip | grep someone rm -r b +echo % import exported patch with external patcher +cat > dummypatch.py < tip.patch +hg --config ui.patch='python ../dummypatch.py' --cwd b import ../tip.patch +cat b/a +rm -r b + echo % import of plain diff should fail without message hg clone -r0 a b hg --cwd a diff -r0:1 > tip.patch diff -r 2fef3051ebb3 -r c4461ea8b4c8 tests/test-import.out --- a/tests/test-import.out Sun Oct 26 14:02:32 2008 +0100 +++ b/tests/test-import.out Sun Oct 26 17:26:28 2008 +0100 @@ -13,6 +13,16 @@ summary: second change % committer should be same user: someone +% import exported patch with external patcher +requesting all changes +adding changesets +adding manifests +adding file changes +added 1 changesets with 2 changes to 2 files +updating working directory +2 files updated, 0 files merged, 0 files removed, 0 files unresolved +applying ../tip.patch +line2 % import of plain diff should fail without message requesting all changes adding changesets