Mercurial > public > mercurial-scm > hg-stable
diff mercurial/cmdutil.py @ 28613:6433da9c96a9
debugobsolete: add an option to show marker index
A bigger picture is the ability to be delete an arbitrary marker form the
repo's obsstore. This is a useful debug ability and it needs a way to indentify
the marker one wants to delete. Having a marker's index provides such an
ability.
author | Kostia Balytskyi <ikostia@fb.com> |
---|---|
date | Wed, 23 Mar 2016 10:50:24 -0700 |
parents | 62e73d42bd14 |
children | 1a1e4350b560 |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Tue Mar 15 09:51:42 2016 +0000 +++ b/mercurial/cmdutil.py Wed Mar 23 10:50:24 2016 -0700 @@ -1597,10 +1597,12 @@ raise error.Abort(inst.args[0]) return t -def showmarker(ui, marker): +def showmarker(ui, marker, index=None): """utility function to display obsolescence marker in a readable way To be used by debug function.""" + if index is not None: + ui.write("%i " % index) ui.write(hex(marker.precnode())) for repl in marker.succnodes(): ui.write(' ')