Mercurial > public > mercurial-scm > hg-stable
comparison 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 |
comparison
equal
deleted
inserted
replaced
28612:6fb1d3c936d2 | 28613:6433da9c96a9 |
---|---|
1595 buffered) | 1595 buffered) |
1596 except SyntaxError as inst: | 1596 except SyntaxError as inst: |
1597 raise error.Abort(inst.args[0]) | 1597 raise error.Abort(inst.args[0]) |
1598 return t | 1598 return t |
1599 | 1599 |
1600 def showmarker(ui, marker): | 1600 def showmarker(ui, marker, index=None): |
1601 """utility function to display obsolescence marker in a readable way | 1601 """utility function to display obsolescence marker in a readable way |
1602 | 1602 |
1603 To be used by debug function.""" | 1603 To be used by debug function.""" |
1604 if index is not None: | |
1605 ui.write("%i " % index) | |
1604 ui.write(hex(marker.precnode())) | 1606 ui.write(hex(marker.precnode())) |
1605 for repl in marker.succnodes(): | 1607 for repl in marker.succnodes(): |
1606 ui.write(' ') | 1608 ui.write(' ') |
1607 ui.write(hex(repl)) | 1609 ui.write(hex(repl)) |
1608 ui.write(' %X ' % marker.flags()) | 1610 ui.write(' %X ' % marker.flags()) |