tests/test-status-inprocess.py
changeset 37901 bbff7170f665
parent 37660 9dfa4e9ed45d
child 39548 7ce9dea3a14a
equal deleted inserted replaced
37900:b3ffa2faae04 37901:bbff7170f665
     1 #!/usr/bin/env python
     1 #!/usr/bin/env python
     2 from __future__ import absolute_import, print_function
     2 from __future__ import absolute_import, print_function
       
     3 
       
     4 import sys
     3 
     5 
     4 from mercurial import (
     6 from mercurial import (
     5     commands,
     7     commands,
     6     localrepo,
     8     localrepo,
     7     ui as uimod,
     9     ui as uimod,
     8 )
    10 )
       
    11 
       
    12 print_ = print
       
    13 def print(*args, **kwargs):
       
    14     """print() wrapper that flushes stdout buffers to avoid py3 buffer issues
       
    15 
       
    16     We could also just write directly to sys.stdout.buffer the way the
       
    17     ui object will, but this was easier for porting the test.
       
    18     """
       
    19     print_(*args, **kwargs)
       
    20     sys.stdout.flush()
     9 
    21 
    10 u = uimod.ui.load()
    22 u = uimod.ui.load()
    11 
    23 
    12 print('% creating repo')
    24 print('% creating repo')
    13 repo = localrepo.localrepository(u, b'.', create=True)
    25 repo = localrepo.localrepository(u, b'.', create=True)