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.
--- 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