changeset 1061:f3867e60d072 stable

compat: always call metadata as a keyword argument Those function are gaining more arguments. using keyword argument keep use safe in all version.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Fri, 15 Aug 2014 17:42:19 -0700
parents f6e0cfca1bf0
children 9cdd32b45bba
files hgext/evolve.py hgext/obsolete.py
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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"