obsolete: avoid 2-argument form of enumerate, which was new in Python 2.6
authorAugie Fackler <raf@durin42.com>
Wed, 20 Aug 2014 14:33:59 -0400
changeset 22262 10880c8aad85
parent 22261 eba48f2b9b74
child 22263 ab0c42d22522
obsolete: avoid 2-argument form of enumerate, which was new in Python 2.6
mercurial/obsolete.py
--- a/mercurial/obsolete.py	Wed Aug 20 13:21:41 2014 -0400
+++ b/mercurial/obsolete.py	Wed Aug 20 14:33:59 2014 -0400
@@ -398,8 +398,8 @@
         if not parents:
             # mark that we explicitly recorded no parents
             metadata['p0'] = ''
-        for i, p in enumerate(parents, 1):
-            metadata['p%i' % i] = node.hex(p)
+        for i, p in enumerate(parents):
+            metadata['p%i' % (i + 1)] = node.hex(p)
     metadata = encodemeta(metadata)
     nbsuc = len(sucs)
     format = _fmfixed + (_fmnode * nbsuc)