Mercurial > public > mercurial-scm > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
20469:6b4c789d618d | 20470:78f4c2b7052f |
---|---|
971 except SyntaxError, inst: | 971 except SyntaxError, inst: |
972 raise util.Abort(inst.args[0]) | 972 raise util.Abort(inst.args[0]) |
973 if tmpl: | 973 if tmpl: |
974 t.use_template(tmpl) | 974 t.use_template(tmpl) |
975 return t | 975 return t |
976 | |
977 def showmarker(ui, marker): | |
978 """utility function to display obsolescence marker in a readable way | |
979 | |
980 To be used by debug function.""" | |
981 ui.write(hex(marker.precnode())) | |
982 for repl in marker.succnodes(): | |
983 ui.write(' ') | |
984 ui.write(hex(repl)) | |
985 ui.write(' %X ' % marker._data[2]) | |
986 ui.write('{%s}' % (', '.join('%r: %r' % t for t in | |
987 sorted(marker.metadata().items())))) | |
988 ui.write('\n') | |
976 | 989 |
977 def finddate(ui, repo, date): | 990 def finddate(ui, repo, date): |
978 """Find the tipmost changeset that matches the given date spec""" | 991 """Find the tipmost changeset that matches the given date spec""" |
979 | 992 |
980 df = util.matchdate(date) | 993 df = util.matchdate(date) |