changeset 11216:1abd9442727c

mq: remove unneeded local variable in delete
author Martin Geisler <mg@lazybytes.net>
date Mon, 24 May 2010 00:55:42 +0200
parents ebc90fd4ebc0
children ffd59c71b8ee
files hgext/mq.py
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/mq.py	Wed May 19 09:54:12 2010 -0500
+++ b/hgext/mq.py	Mon May 24 00:55:42 2010 +0200
@@ -741,7 +741,6 @@
             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 @@
                 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 @@
             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: