Mercurial > hg
changeset 10661:c4859aad1980
mq: all_files can be a set, remove dangerous default values
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Sat, 13 Mar 2010 00:02:33 +0100 |
parents | 24555e216af6 |
children | e8e56d8377ab |
files | hgext/mq.py |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/mq.py Fri Mar 12 00:50:41 2010 +0100 +++ b/hgext/mq.py Sat Mar 13 00:02:33 2010 +0100 @@ -616,7 +616,7 @@ return (True, files, fuzz) def apply(self, repo, series, list=False, update_status=True, - strict=False, patchdir=None, merge=None, all_files={}): + strict=False, patchdir=None, merge=None, all_files=None): wlock = lock = tr = None try: wlock = repo.wlock() @@ -641,7 +641,7 @@ self.removeundo(repo) def _apply(self, repo, series, list=False, update_status=True, - strict=False, patchdir=None, merge=None, all_files={}): + strict=False, patchdir=None, merge=None, all_files=None): '''returns (error, hash) error = 1 for unable to read, 2 for patch failed, 3 for patch fuzz''' # TODO unify with commands.py @@ -674,7 +674,8 @@ if ph.haspatch: (patcherr, files, fuzz) = self.patch(repo, pf) - all_files.update(files) + if all_files is not None: + all_files.update(files) patcherr = not patcherr else: self.ui.warn(_("patch %s is empty\n") % patchname) @@ -1071,7 +1072,7 @@ end = self.series.index(patch, start) + 1 s = self.series[start:end] - all_files = {} + all_files = set() try: if mergeq: ret = self.mergepatch(repo, mergeq, s, diffopts)