##// END OF EJS Templates
tests: use /usr/bin/env python for test-status-inprocess.py...
tests: use /usr/bin/env python for test-status-inprocess.py everyone else uses it, and the next commit will add a rule for it

File last commit:

r28824:9d31582d default
r28824:9d31582d default
Show More
test-status-inprocess.py
40 lines | 698 B | text/x-python | PythonLexer
/ tests / test-status-inprocess.py
timeless
tests: use /usr/bin/env python for test-status-inprocess.py...
r28824 #!/usr/bin/env python
Robert Stanca
py3: use print_function in test-status-inprocess.py
r28766 from __future__ import absolute_import, print_function
Robert Stanca
py3: use absolute_import in test-status-inprocess.py
r28765 from mercurial.ui import (
ui,
)
from mercurial.localrepo import (
localrepository,
)
from mercurial.commands import (
add,
commit,
status,
)
Ronny Pfannschmidt
add a test for the inprocess status dirstate race
r10838
u = ui()
Robert Stanca
py3: use print_function in test-status-inprocess.py
r28766 print('% creating repo')
Ronny Pfannschmidt
add a test for the inprocess status dirstate race
r10838 repo = localrepository(u, '.', create=True)
f = open('test.py', 'w')
try:
f.write('foo\n')
finally:
f.close
Robert Stanca
py3: use print_function in test-status-inprocess.py
r28766 print('% add and commit')
Ronny Pfannschmidt
add a test for the inprocess status dirstate race
r10838 add(u, repo, 'test.py')
commit(u, repo, message='*')
status(u, repo, clean=True)
Robert Stanca
py3: use print_function in test-status-inprocess.py
r28766 print('% change')
Ronny Pfannschmidt
add a test for the inprocess status dirstate race
r10838 f = open('test.py', 'w')
try:
f.write('bar\n')
finally:
f.close()
# this would return clean instead of changed before the fix
status(u, repo, clean=True, modified=True)