Mercurial > public > mercurial-scm > hg-stable
diff mercurial/obsolete.py @ 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 | 2e6f03a193f9 |
children | ca2e9cf77033 |
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)