diff -r eba48f2b9b74 -r 10880c8aad85 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)