mq: remove unneeded local variable in delete
authorMartin Geisler <mg@lazybytes.net>
Mon, 24 May 2010 00:55:42 +0200
changeset 11216 1abd9442727c
parent 11215 ebc90fd4ebc0
child 11218 ffd59c71b8ee
mq: remove unneeded local variable in delete
hgext/mq.py
--- 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: