changeset 22262:10880c8aad85

obsolete: avoid 2-argument form of enumerate, which was new in Python 2.6
author Augie Fackler <raf@durin42.com>
date Wed, 20 Aug 2014 14:33:59 -0400
parents eba48f2b9b74
children ab0c42d22522
files mercurial/obsolete.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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)