mercurial/util.py
changeset 2314 e9b5749e4de3
parent 2308 cb520d961d6a
child 2448 b77a2ef61b81
equal deleted inserted replaced
2313:a600d9997521 2314:e9b5749e4de3
    92 
    92 
    93 def patch(strip, patchname, ui):
    93 def patch(strip, patchname, ui):
    94     """apply the patch <patchname> to the working directory.
    94     """apply the patch <patchname> to the working directory.
    95     a list of patched files is returned"""
    95     a list of patched files is returned"""
    96     patcher = find_in_path('gpatch', os.environ.get('PATH', ''), 'patch')
    96     patcher = find_in_path('gpatch', os.environ.get('PATH', ''), 'patch')
    97     fp = os.popen('"%s" -p%d < "%s"' % (patcher, strip, patchname))
    97     fp = os.popen('%s -p%d < "%s"' % (patcher, strip, patchname))
    98     files = {}
    98     files = {}
    99     for line in fp:
    99     for line in fp:
   100         line = line.rstrip()
   100         line = line.rstrip()
   101         ui.status("%s\n" % line)
   101         ui.status("%s\n" % line)
   102         if line.startswith('patching file '):
   102         if line.startswith('patching file '):