tests/test-status-inprocess.py
branchstable
changeset 10838 07dbafd3a0e2
child 10905 13a1b2fb7ef2
equal deleted inserted replaced
10836:e5aaa4543289 10838:07dbafd3a0e2
       
     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)