This test is now pretty close to passing on Python 3.
- skip-blame because just b'' prefixes.
hg-reviewers |
This test is now pretty close to passing on Python 3.
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
Path | Packages | |||
---|---|---|---|---|
M | tests/test-keyword.t (10 lines) |
$ diff a hooktest | $ diff a hooktest | ||||
$ cp $HGRCPATH.nohooks $HGRCPATH | $ cp $HGRCPATH.nohooks $HGRCPATH | ||||
$ rm hooktest | $ rm hooktest | ||||
hg status of kw-ignored binary file starting with '\1\n' | hg status of kw-ignored binary file starting with '\1\n' | ||||
>>> open("i", "wb").write("\1\nfoo") and None | >>> open("i", "wb").write(b"\1\nfoo") and None | ||||
$ hg -q commit -Am metasep i | $ hg -q commit -Am metasep i | ||||
$ hg status | $ hg status | ||||
>>> open("i", "wb").write("\1\nbar") and None | >>> open("i", "wb").write(b"\1\nbar") and None | ||||
$ hg status | $ hg status | ||||
M i | M i | ||||
$ hg -q commit -m "modify metasep" i | $ hg -q commit -m "modify metasep" i | ||||
$ hg status --rev 2:3 | $ hg status --rev 2:3 | ||||
M i | M i | ||||
$ touch empty | $ touch empty | ||||
$ hg -q commit -A -m "another file" | $ hg -q commit -A -m "another file" | ||||
$ hg status -A --rev 3:4 i | $ hg status -A --rev 3:4 i | ||||
record | record | ||||
$ echo '$Id$' > r | $ echo '$Id$' > r | ||||
$ hg add r | $ hg add r | ||||
record chunk | record chunk | ||||
>>> lines = open('a', 'rb').readlines() | >>> lines = open('a', 'rb').readlines() | ||||
>>> lines.insert(1, 'foo\n') | >>> lines.insert(1, b'foo\n') | ||||
>>> lines.append('bar\n') | >>> lines.append(b'bar\n') | ||||
>>> open('a', 'wb').writelines(lines) | >>> open('a', 'wb').writelines(lines) | ||||
$ hg record -d '10 1' -m rectest a<<EOF | $ hg record -d '10 1' -m rectest a<<EOF | ||||
> y | > y | ||||
> y | > y | ||||
> n | > n | ||||
> EOF | > EOF | ||||
diff --git a/a b/a | diff --git a/a b/a | ||||
2 hunks, 2 lines changed | 2 hunks, 2 lines changed | ||||
tag: tip | tag: tip | ||||
user: User Name <user@example.com> | user: User Name <user@example.com> | ||||
date: Thu Jan 01 00:00:02 1970 +0000 | date: Thu Jan 01 00:00:02 1970 +0000 | ||||
summary: firstline | summary: firstline | ||||
Imported patch should not be rejected | Imported patch should not be rejected | ||||
>>> import re | >>> import re | ||||
>>> text = re.sub(r'(Id.*)', r'\1 rejecttest', open('a').read()) | >>> text = re.sub(br'(Id.*)', br'\1 rejecttest', open('a', 'rb').read()) | ||||
>>> open('a', 'wb').write(text) and None | >>> open('a', 'wb').write(text) and None | ||||
$ hg --debug commit -m'rejects?' -d '3 0' -u 'User Name <user@example.com>' | $ hg --debug commit -m'rejects?' -d '3 0' -u 'User Name <user@example.com>' | ||||
committing files: | committing files: | ||||
a | a | ||||
committing manifest | committing manifest | ||||
committing changelog | committing changelog | ||||
overwriting a expanding keywords | overwriting a expanding keywords | ||||
updating the branch cache | updating the branch cache |