compat: always call metadata as a keyword argument stable
authorPierre-Yves David <pierre-yves.david@fb.com>
Fri, 15 Aug 2014 17:42:19 -0700
branchstable
changeset 1061 f3867e60d072
parent 1060 f6e0cfca1bf0
child 1062 9cdd32b45bba
compat: always call metadata as a keyword argument Those function are gaining more arguments. using keyword argument keep use safe in all version.
hgext/evolve.py
hgext/obsolete.py
--- a/hgext/evolve.py	Fri Aug 15 16:54:32 2014 -0700
+++ b/hgext/evolve.py	Fri Aug 15 17:42:19 2014 -0700
@@ -1019,7 +1019,7 @@
                     for i, p in enumerate(ctx.parents(), 1):
                         meta['p%i' % i] = p.hex()
                     before = len(store._all)
-                    store.create(tr, mark[0], mark[1], mark[2], meta)
+                    store.create(tr, mark[0], mark[1], mark[2], metadata=meta)
                     if len(store._all) - before:
                         ui.write('created new markers for %i\n' % rev)
             ui.progress(pgop, idx, total=pgtotal)
--- a/hgext/obsolete.py	Fri Aug 15 16:54:32 2014 -0700
+++ b/hgext/obsolete.py	Fri Aug 15 17:42:19 2014 -0700
@@ -96,7 +96,7 @@
                             'user': ui.username(),
                             }
                         try:
-                            store.create(tr, prec, sucs, 0, meta)
+                            store.create(tr, prec, sucs, 0, metadata=meta)
                             cnt += 1
                         except ValueError:
                             repo.ui.write_err("invalid old marker line: %s"
@@ -135,7 +135,7 @@
                         succs = [bin(n) for n in oldsubjects]
                         succs = [n for n in succs if n != nullid]
                         store.create(tr, bin(oldobject), succs,
-                                     0, meta)
+                                     0, metadata=meta)
                         cnt += 1
                     except ValueError:
                         repo.ui.write_err("invalid marker %s -> %s\n"