Mercurial > hg
comparison mercurial/util.py @ 2314:e9b5749e4de3
Remove quotes from patch command.
When the gpatch fix for solaris was introduced in 67a0a3852024 the
patch command was "". For some strange reason windows 2000 is
not happy with those quotes when given in os.popen.
author | Volker Kleinfeld <Volker.Kleinfeld@gmx.de> |
---|---|
date | Thu, 18 May 2006 22:35:41 -0700 |
parents | cb520d961d6a |
children | b77a2ef61b81 |
comparison
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 '): |