equal
deleted
inserted
replaced
307 $ echo '$Id$' > r |
307 $ echo '$Id$' > r |
308 $ hg add r |
308 $ hg add r |
309 |
309 |
310 record chunk |
310 record chunk |
311 |
311 |
312 $ python -c \ |
312 >>> lines = open('a').readlines() |
313 > 'l=open("a").readlines();l.insert(1,"foo\n");l.append("bar\n");open("a","w").writelines(l);' |
313 >>> lines.insert(1, 'foo\n') |
|
314 >>> lines.append('bar\n') |
|
315 >>> open('a', 'w').writelines(lines) |
314 $ hg record -d '1 10' -m rectest a<<EOF |
316 $ hg record -d '1 10' -m rectest a<<EOF |
315 > y |
317 > y |
316 > y |
318 > y |
317 > n |
319 > n |
318 > EOF |
320 > EOF |
807 date: Thu Jan 01 00:00:02 1970 +0000 |
809 date: Thu Jan 01 00:00:02 1970 +0000 |
808 summary: firstline |
810 summary: firstline |
809 |
811 |
810 Imported patch should not be rejected |
812 Imported patch should not be rejected |
811 |
813 |
812 $ python -c \ |
814 >>> import re |
813 > 'import re; s=re.sub("(Id.*)","\\1 rejecttest",open("a").read()); open("a","wb").write(s);' |
815 >>> text = re.sub(r'(Id.*)', r'\1 rejecttest', open('a').read()) |
|
816 >>> open('a', 'wb').write(text) |
814 $ hg --debug commit -m'rejects?' -d '3 0' -u 'User Name <user@example.com>' |
817 $ hg --debug commit -m'rejects?' -d '3 0' -u 'User Name <user@example.com>' |
815 a |
818 a |
816 overwriting a expanding keywords |
819 overwriting a expanding keywords |
817 committed changeset 2:85e279d709ffc28c9fdd1b868570985fc3d87082 |
820 committed changeset 2:85e279d709ffc28c9fdd1b868570985fc3d87082 |
818 $ hg export -o ../rejecttest.diff tip |
821 $ hg export -o ../rejecttest.diff tip |