##// END OF EJS Templates
patch: fix patched files records in externalpatcher()
Patrick Mezard -
r7247:c4461ea8 default
parent child Browse files
Show More
@@ -1060,7 +1060,7 b' def externalpatch(patcher, args, patchna'
1060 if line.startswith('patching file '):
1060 if line.startswith('patching file '):
1061 pf = util.parse_patch_output(line)
1061 pf = util.parse_patch_output(line)
1062 printed_file = False
1062 printed_file = False
1063 files.setdefault(pf, (None, None))
1063 files.setdefault(pf, None)
1064 elif line.find('with fuzz') >= 0:
1064 elif line.find('with fuzz') >= 0:
1065 fuzz = True
1065 fuzz = True
1066 if not printed_file:
1066 if not printed_file:
@@ -20,6 +20,18 b' echo % committer should be same'
20 hg --cwd b tip | grep someone
20 hg --cwd b tip | grep someone
21 rm -r b
21 rm -r b
22
22
23 echo % import exported patch with external patcher
24 cat > dummypatch.py <<EOF
25 print 'patching file a'
26 file('a', 'wb').write('line2\n')
27 EOF
28 chmod +x dummypatch.py
29 hg clone -r0 a b
30 hg --cwd a export tip > tip.patch
31 hg --config ui.patch='python ../dummypatch.py' --cwd b import ../tip.patch
32 cat b/a
33 rm -r b
34
23 echo % import of plain diff should fail without message
35 echo % import of plain diff should fail without message
24 hg clone -r0 a b
36 hg clone -r0 a b
25 hg --cwd a diff -r0:1 > tip.patch
37 hg --cwd a diff -r0:1 > tip.patch
@@ -13,6 +13,16 b' applying ../tip.patch'
13 summary: second change
13 summary: second change
14 % committer should be same
14 % committer should be same
15 user: someone
15 user: someone
16 % import exported patch with external patcher
17 requesting all changes
18 adding changesets
19 adding manifests
20 adding file changes
21 added 1 changesets with 2 changes to 2 files
22 updating working directory
23 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
24 applying ../tip.patch
25 line2
16 % import of plain diff should fail without message
26 % import of plain diff should fail without message
17 requesting all changes
27 requesting all changes
18 adding changesets
28 adding changesets
General Comments 0
You need to be logged in to leave comments. Login now