obshistory: add docstring to cmddebugobshistory
authorBoris Feld <boris.feld@octobus.net>
Thu, 18 May 2017 17:40:07 +0200
changeset 2414 fcf54ec1eaf7
parent 2413 22fb71a2d865
child 2415 89a5dabbb43d
obshistory: add docstring to cmddebugobshistory Add debugobshistory command documentation based on the log command documentation.
hgext3rd/evolve/__init__.py
--- a/hgext3rd/evolve/__init__.py	Thu May 18 17:47:59 2017 +0200
+++ b/hgext3rd/evolve/__init__.py	Thu May 18 17:40:07 2017 +0200
@@ -3265,9 +3265,37 @@
 @eh.command(
     '^debugobshistory',
     [('G', 'graph', True, _("show the revision DAG")),
+     ('r', 'rev', [], _('show the specified revision or revset'), _('REV'))
     ] + commands.formatteropts,
     _('hg debugobshistory [OPTION]... [REV]'))
 def cmdobshistory(ui, repo, *revs, **opts):
+    """show the obsolescence history of the specified revisions.
+
+    By default this command prints the selected revisions and all its
+    precursors. For precursors pointing on existing revisions in the repository,
+    it will display revisions node id, revision number and the first line of the
+    description. For precursors pointing on non existing revisions in the
+    repository (that can happen when exchanging obsolescence-markers), display
+    only the node id.
+
+    In both case, for each node, its obsolescence marker will be displayed with
+    the obsolescence operation (rewritten or pruned) in addition of the user and
+    date of the operation.
+
+    The output is a graph by default but can deactivated with the option '--no-
+    graph'.
+
+    'o' is a changeset, '@' is a working directory parent, 'x' is obsolete,
+    and '+' represents a fork where the changeset from the lines below is a
+    parent of the 'o' merge on the same line.
+
+    Paths in the DAG are represented with '|', '/' and so forth.
+
+    Returns 0 on success.
+    """
+    revs = list(revs) + opts['rev']
+    if not revs:
+        revs = ['.']
     revs = scmutil.revrange(repo, revs)
 
     if opts['graph']: