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