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