Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/patch.py @ 3056:6848528f7ebd
Remove temporary git patch files
author | Brendan Cully <brendan@kublai.com> |
---|---|
date | Wed, 30 Aug 2006 13:42:57 -0700 |
parents | efd26ceedafb |
children | d16b93f4a6ca |
comparison
equal
deleted
inserted
replaced
3055:efd26ceedafb | 3056:6848528f7ebd |
---|---|
239 if cwd: | 239 if cwd: |
240 args.append('-d %s' % util.shellquote(cwd)) | 240 args.append('-d %s' % util.shellquote(cwd)) |
241 fp = os.popen('%s %s -p%d < %s' % (patcher, ' '.join(args), strip, | 241 fp = os.popen('%s %s -p%d < %s' % (patcher, ' '.join(args), strip, |
242 util.shellquote(patchname))) | 242 util.shellquote(patchname))) |
243 | 243 |
244 if dopatch == 'filter': | |
245 False and os.unlink(patchname) | |
246 | |
247 for line in fp: | 244 for line in fp: |
248 line = line.rstrip() | 245 line = line.rstrip() |
249 ui.note(line + '\n') | 246 ui.note(line + '\n') |
250 if line.startswith('patching file '): | 247 if line.startswith('patching file '): |
251 pf = util.parse_patch_output(line) | 248 pf = util.parse_patch_output(line) |
263 if not printed_file: | 260 if not printed_file: |
264 ui.warn(pf + '\n') | 261 ui.warn(pf + '\n') |
265 printed_file = True | 262 printed_file = True |
266 ui.warn(line + '\n') | 263 ui.warn(line + '\n') |
267 | 264 |
265 if dopatch == 'filter': | |
266 os.unlink(patchname) | |
267 | |
268 code = fp.close() | 268 code = fp.close() |
269 if code: | 269 if code: |
270 raise util.Abort(_("patch command failed: %s") % | 270 raise util.Abort(_("patch command failed: %s") % |
271 util.explain_exit(code)[0]) | 271 util.explain_exit(code)[0]) |
272 | 272 |