Show More
@@ -1,35 +1,35 b'' | |||||
1 | #!/usr/bin/env python |
|
1 | #!/usr/bin/env python | |
2 | from __future__ import absolute_import, print_function |
|
2 | from __future__ import absolute_import, print_function | |
3 |
|
3 | |||
4 | from mercurial import ( |
|
4 | from mercurial import ( | |
5 | commands, |
|
5 | commands, | |
6 | localrepo, |
|
6 | localrepo, | |
7 | ui as uimod, |
|
7 | ui as uimod, | |
8 | ) |
|
8 | ) | |
9 |
|
9 | |||
10 | u = uimod.ui.load() |
|
10 | u = uimod.ui.load() | |
11 |
|
11 | |||
12 | print('% creating repo') |
|
12 | print('% creating repo') | |
13 | repo = localrepo.localrepository(u, '.', create=True) |
|
13 | repo = localrepo.localrepository(u, b'.', create=True) | |
14 |
|
14 | |||
15 | f = open('test.py', 'w') |
|
15 | f = open('test.py', 'w') | |
16 | try: |
|
16 | try: | |
17 | f.write('foo\n') |
|
17 | f.write('foo\n') | |
18 | finally: |
|
18 | finally: | |
19 | f.close |
|
19 | f.close | |
20 |
|
20 | |||
21 | print('% add and commit') |
|
21 | print('% add and commit') | |
22 | commands.add(u, repo, 'test.py') |
|
22 | commands.add(u, repo, b'test.py') | |
23 | commands.commit(u, repo, message='*') |
|
23 | commands.commit(u, repo, message=b'*') | |
24 | commands.status(u, repo, clean=True) |
|
24 | commands.status(u, repo, clean=True) | |
25 |
|
25 | |||
26 |
|
26 | |||
27 | print('% change') |
|
27 | print('% change') | |
28 | f = open('test.py', 'w') |
|
28 | f = open('test.py', 'w') | |
29 | try: |
|
29 | try: | |
30 | f.write('bar\n') |
|
30 | f.write('bar\n') | |
31 | finally: |
|
31 | finally: | |
32 | f.close() |
|
32 | f.close() | |
33 |
|
33 | |||
34 | # this would return clean instead of changed before the fix |
|
34 | # this would return clean instead of changed before the fix | |
35 | commands.status(u, repo, clean=True, modified=True) |
|
35 | commands.status(u, repo, clean=True, modified=True) |
General Comments 0
You need to be logged in to leave comments.
Login now