evolve: update cmddebugrecordpruneparents to the new markers creation API stable
authorPierre-Yves David <pierre-yves.david@fb.com>
Mon, 04 May 2015 10:47:02 -0700
branchstable
changeset 1311 d6a740947197
parent 1310 f032d93506d8
child 1312 1218ad94a351
evolve: update cmddebugrecordpruneparents to the new markers creation API The parents information are now first class citizen. (caught by laurent using pylint)
hgext/evolve.py
--- a/hgext/evolve.py	Mon May 04 10:46:06 2015 -0700
+++ b/hgext/evolve.py	Mon May 04 10:47:02 2015 -0700
@@ -981,11 +981,10 @@
                 rev = nm.get(mark[0])
                 if rev is not None:
                     ctx = unfi[rev]
-                    meta = obsolete.decodemeta(mark[3])
-                    for i, p in enumerate(ctx.parents(), 1):
-                        meta['p%i' % i] = p.hex()
+                    parents = tuple(p.node() for p in ctx.parents())
                     before = len(store._all)
-                    store.create(tr, mark[0], mark[1], mark[2], metadata=meta)
+                    store.create(tr, mark[0], mark[1], mark[2], marks[3],
+                                 parents=parents)
                     if len(store._all) - before:
                         ui.write('created new markers for %i\n' % rev)
             ui.progress(pgop, idx, total=pgtotal)