##// END OF EJS Templates
add a test for the inprocess status dirstate race
Ronny Pfannschmidt -
r10838:07dbafd3 stable
parent child Browse files
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)
@@ -0,0 +1,5 b''
1 % creating repo
2 % add and commit
3 C test.py
4 % change
5 M test.py
General Comments 0
You need to be logged in to leave comments. Login now