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