Mercurial > public > mercurial-scm > hg
diff mercurial/cmdutil.py @ 20470:78f4c2b7052f
debugobsolete: extract marker display in a dedicated function
We want to be able to reuse and extend it from other function or
extension while working on markers exchange.
This changeset is pure core movement.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Tue, 11 Feb 2014 16:30:23 -0800 |
parents | d4f804caa0ed |
children | ce3f3082ec45 |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Thu Jan 30 16:12:49 2014 -0800 +++ b/mercurial/cmdutil.py Tue Feb 11 16:30:23 2014 -0800 @@ -974,6 +974,19 @@ t.use_template(tmpl) return t +def showmarker(ui, marker): + """utility function to display obsolescence marker in a readable way + + To be used by debug function.""" + ui.write(hex(marker.precnode())) + for repl in marker.succnodes(): + ui.write(' ') + ui.write(hex(repl)) + ui.write(' %X ' % marker._data[2]) + ui.write('{%s}' % (', '.join('%r: %r' % t for t in + sorted(marker.metadata().items())))) + ui.write('\n') + def finddate(ui, repo, date): """Find the tipmost changeset that matches the given date spec"""