Mercurial > public > mercurial-scm > hg-stable
diff mercurial/commands.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 | 10b6fc51f672 |
children | 2b3b703b3a2b |
line wrap: on
line diff
--- a/mercurial/commands.py Wed Oct 18 10:37:34 2006 -0700 +++ b/mercurial/commands.py Wed Oct 18 10:37:34 2006 -0700 @@ -1656,8 +1656,12 @@ message = None ui.debug(_('message:\n%s\n') % message) - files, fuzz = patch.patch(tmpname, ui, strip=strip, cwd=repo.root) - files = patch.updatedir(ui, repo, files, wlock=wlock) + files = {} + try: + fuzz = patch.patch(tmpname, ui, strip=strip, cwd=repo.root, + files=files) + finally: + files = patch.updatedir(ui, repo, files, wlock=wlock) repo.commit(files, message, user, date, wlock=wlock, lock=lock) finally: os.unlink(tmpname)