mq: rename next() to nextpatch() to avoid confusing a future check-code patch stable
authorAugie Fackler <raf@durin42.com>
Thu, 25 Jul 2013 10:42:36 -0400
branchstable
changeset 19500 a96565abbd59
parent 19499 81318ca090a2
child 19501 725507cd5216
mq: rename next() to nextpatch() to avoid confusing a future check-code patch next() is a builtin starting in 2.6, so it's also nice to avoid shadowing the builtin.
hgext/mq.py
--- a/hgext/mq.py	Thu Jul 25 15:27:41 2013 +0400
+++ b/hgext/mq.py	Thu Jul 25 10:42:36 2013 -0400
@@ -1877,7 +1877,7 @@
         index of the first patch past the last applied one.
         """
         end = 0
-        def next(start):
+        def nextpatch(start):
             if all_patches or start >= len(self.series):
                 return start
             for i in xrange(start, len(self.series)):
@@ -1892,8 +1892,8 @@
                 end = self.series.index(p)
             except ValueError:
                 return 0
-            return next(end + 1)
-        return next(end)
+            return nextpatch(end + 1)
+        return nextpatch(end)
 
     def appliedname(self, index):
         pname = self.applied[index].name