diff --git a/hgext/mq.py b/hgext/mq.py --- a/hgext/mq.py +++ b/hgext/mq.py @@ -741,7 +741,6 @@ class queue(object): raise util.Abort(_('qdelete requires at least one revision or ' 'patch name')) - realpatches = [] for patch in patches: patch = self.lookup(patch, strict=True) info = self.isapplied(patch) @@ -749,8 +748,8 @@ class queue(object): raise util.Abort(_("cannot delete applied patch %s") % patch) if patch not in self.series: raise util.Abort(_("patch %s not in series file") % patch) - realpatches.append(patch) + patches = list(patches) numrevs = 0 if opts.get('rev'): if not self.applied: @@ -759,10 +758,10 @@ class queue(object): if len(revs) > 1 and revs[0] > revs[1]: revs.reverse() revpatches = self._revpatches(repo, revs) - realpatches += revpatches + patches += revpatches numrevs = len(revpatches) - self._cleanup(realpatches, numrevs, opts.get('keep')) + self._cleanup(patches, numrevs, opts.get('keep')) def check_toppatch(self, repo): if self.applied: