tests/test-http-branchmap.t
changeset 38031 37ef6ee87488
parent 38030 69779a222d5e
equal deleted inserted replaced
38030:69779a222d5e 38031:37ef6ee87488
    57 
    57 
    58 verify 7e7d56fe4833 (encoding fallback in branchmap to maintain compatibility with 1.3.x)
    58 verify 7e7d56fe4833 (encoding fallback in branchmap to maintain compatibility with 1.3.x)
    59 
    59 
    60   $ cat <<EOF > oldhg
    60   $ cat <<EOF > oldhg
    61   > import threading
    61   > import threading
    62   > from mercurial import hg, ui, wireprotoserver
    62   > from mercurial import dispatch, hg, ui, wireprotoserver
    63   > 
    63   > 
    64   > class StdoutWrapper(object):
    64   > class StdoutWrapper(object):
    65   >     def __init__(self, stdout):
    65   >     def __init__(self, stdout):
    66   >         self._file = stdout
    66   >         self._file = stdout
    67   > 
    67   > 
    75   >         self._file.write(data)
    75   >         self._file.write(data)
    76   > 
    76   > 
    77   >     def __getattr__(self, name):
    77   >     def __getattr__(self, name):
    78   >         return getattr(self._file, name)
    78   >         return getattr(self._file, name)
    79   > 
    79   > 
       
    80   > dispatch.initstdio()
    80   > myui = ui.ui.load()
    81   > myui = ui.ui.load()
    81   > fout = StdoutWrapper(myui.fout)
    82   > fout = StdoutWrapper(myui.fout)
    82   > myui.fout = myui.ferr
    83   > myui.fout = myui.ferr
    83   > repo = hg.repository(myui, b'a')
    84   > repo = hg.repository(myui, b'a')
    84   > wireprotoserver._runsshserver(myui, repo, myui.fin, fout, threading.Event())
    85   > wireprotoserver._runsshserver(myui, repo, myui.fin, fout, threading.Event())