Mercurial > hg-stable
changeset 22216:9be81b86ca97
obsolete: explicitly pass metadata argument using keyword argument
We are about to add more arguments to this function (date, parents, etc).
Passing metadata as a keyword argument gives us more flexibility when adding
them.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Thu, 14 Aug 2014 01:53:07 -0700 |
parents | 525cde5d954d |
children | 570f87422f54 |
files | mercurial/commands.py mercurial/obsolete.py |
diffstat | 2 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Fri Aug 15 09:41:30 2014 -0700 +++ b/mercurial/commands.py Thu Aug 14 01:53:07 2014 -0700 @@ -2341,7 +2341,7 @@ try: try: repo.obsstore.create(tr, parsenodeid(precursor), succs, - opts['flags'], metadata) + opts['flags'], metadata=metadata) tr.close() except ValueError, exc: raise util.Abort(_('bad obsmarker input: %s') % exc)
--- a/mercurial/obsolete.py Fri Aug 15 09:41:30 2014 -0700 +++ b/mercurial/obsolete.py Thu Aug 14 01:53:07 2014 -0700 @@ -868,7 +868,8 @@ nsucs = tuple(s.node() for s in sucs) if nprec in nsucs: raise util.Abort("changeset %s cannot obsolete itself" % prec) - repo.obsstore.create(tr, nprec, nsucs, flag, localmetadata) + repo.obsstore.create(tr, nprec, nsucs, flag, + metadata=localmetadata) repo.filteredrevcache.clear() tr.close() finally: