Mercurial > public > mercurial-scm > hg
diff hgext/mq.py @ 3465: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 |
line wrap: on
line diff
--- a/hgext/mq.py Wed Oct 18 10:37:34 2006 -0700 +++ b/hgext/mq.py Wed Oct 18 10:37:34 2006 -0700 @@ -408,14 +408,15 @@ def patch(self, repo, patchfile): '''Apply patchfile to the working directory. patchfile: file name of patch''' + files = {} try: - (files, fuzz) = patch.patch(patchfile, self.ui, strip=1, - cwd=repo.root) + fuzz = patch.patch(patchfile, self.ui, strip=1, cwd=repo.root, + files=files) except Exception, inst: self.ui.note(str(inst) + '\n') if not self.ui.verbose: self.ui.warn("patch failed, unable to continue (try -v)\n") - return (False, [], False) + return (False, files, False) return (True, files, fuzz)