utility: add a function to prompt user to choose a revision
This patch adds a utility function to interactively prompt user to choose a
revision to proceed in cases when there are multiple revisions which are
candidates.
The function will be used in `hg evolve`, `hg next`, `hg prev` etc. If user
feedback will be good, I plan to move it to core and use it at more possible
places.
import hghave
@hghave.check("docgraph-ext", "Extension to generate graph from repository")
def docgraph():
try:
import hgext.docgraph
hgext.docgraph.cmdtable # trigger import
except ImportError:
try:
import hgext3rd.docgraph
hgext3rd.docgraph.cmdtable # trigger import
except ImportError:
return False
return True