# HG changeset patch # User Pierre-Yves David # Date 1408006387 25200 # Node ID 9be81b86ca97790d3a79c0383a31416cfef5e4d0 # Parent 525cde5d954d689d3f5807a777ce1a7914917ec2 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. diff -r 525cde5d954d -r 9be81b86ca97 mercurial/commands.py --- 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) diff -r 525cde5d954d -r 9be81b86ca97 mercurial/obsolete.py --- 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: