Mercurial > hg > mercurial-crew-with-dirclash
comparison hgext/mq.py @ 3460:2d35a8d2b32d
patch: return list of modified files even when an exception is raised
The file list is passed in as an argument and updated in place.
This fixes issue399.
author | Brendan Cully <brendan@kublai.com> |
---|---|
date | Wed, 18 Oct 2006 10:37:34 -0700 |
parents | 58202386deb7 |
children | 0e68608bd11d |
comparison
equal
deleted
inserted
replaced
3459:ba3a96750de0 | 3460:2d35a8d2b32d |
---|---|
406 return (0, head) | 406 return (0, head) |
407 | 407 |
408 def patch(self, repo, patchfile): | 408 def patch(self, repo, patchfile): |
409 '''Apply patchfile to the working directory. | 409 '''Apply patchfile to the working directory. |
410 patchfile: file name of patch''' | 410 patchfile: file name of patch''' |
411 files = {} | |
411 try: | 412 try: |
412 (files, fuzz) = patch.patch(patchfile, self.ui, strip=1, | 413 fuzz = patch.patch(patchfile, self.ui, strip=1, cwd=repo.root, |
413 cwd=repo.root) | 414 files=files) |
414 except Exception, inst: | 415 except Exception, inst: |
415 self.ui.note(str(inst) + '\n') | 416 self.ui.note(str(inst) + '\n') |
416 if not self.ui.verbose: | 417 if not self.ui.verbose: |
417 self.ui.warn("patch failed, unable to continue (try -v)\n") | 418 self.ui.warn("patch failed, unable to continue (try -v)\n") |
418 return (False, [], False) | 419 return (False, files, False) |
419 | 420 |
420 return (True, files, fuzz) | 421 return (True, files, fuzz) |
421 | 422 |
422 def apply(self, repo, series, list=False, update_status=True, | 423 def apply(self, repo, series, list=False, update_status=True, |
423 strict=False, patchdir=None, merge=None, wlock=None): | 424 strict=False, patchdir=None, merge=None, wlock=None): |