mq: unused variables, improper usage of 'is [not]', undefined variable
authorBenoit Boissinot <benoit.boissinot@ens-lyon.org>
Sun, 06 Aug 2006 17:27:05 +0200
changeset 2797 a3c6e7888abf
parent 2796 4c39568007f9
child 2798 2d60c682a081
mq: unused variables, improper usage of 'is [not]', undefined variable
hgext/mq.py
--- a/hgext/mq.py	Sun Aug 06 17:24:13 2006 +0200
+++ b/hgext/mq.py	Sun Aug 06 17:27:05 2006 +0200
@@ -539,7 +539,6 @@
         saveheads = []
         savebases = {}
 
-        tip = chlog.tip()
         heads = limitheads(chlog, rev)
         seen = {}
 
@@ -570,7 +569,7 @@
                         savebases[x] = 1
 
         # create a changegroup for all the branches we need to keep
-        if backup is "all":
+        if backup == "all":
             backupch = repo.changegroupsubset([rev], chlog.heads(), 'strip')
             bundle(backupch)
         if saveheads:
@@ -585,7 +584,7 @@
         if saveheads:
             self.ui.status("adding branch\n")
             commands.unbundle(self.ui, repo, chgrpfile, update=False)
-            if backup is not "strip":
+            if backup != "strip":
                 os.unlink(chgrpfile)
 
     def isapplied(self, patch):
@@ -805,7 +804,6 @@
             return
         wlock = repo.wlock()
         self.check_toppatch(repo)
-        qp = self.qparents(repo)
         (top, patch) = (self.applied[-1].rev, self.applied[-1].name)
         top = revlog.bin(top)
         cparents = repo.changelog.parents(top)
@@ -1341,7 +1339,7 @@
     for f in files:
         patch = q.lookup(f)
         if patch in patches or patch == parent:
-            self.ui.warn(_('Skipping already folded patch %s') % patch)
+            ui.warn(_('Skipping already folded patch %s') % patch)
         if q.isapplied(patch):
             raise util.Abort(_('qfold cannot fold already applied patch %s') % patch)
         patches.append(patch)