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