Patchwork D6467: doc: fix description of "predecessors" to match reality

login
register
mail settings
Submitter phabricator
Date May 31, 2019, 11:26 p.m.
Message ID <differential-rev-PHID-DREV-ufqyxh5oxyj3u5dwitdf-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/40291/
State Superseded
Headers show

Comments

phabricator - May 31, 2019, 11:26 p.m.
joerg.sonnenberger created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D6467

AFFECTED FILES
  mercurial/templatekw.py

CHANGE DETAILS




To: joerg.sonnenberger, #hg-reviewers
Cc: mercurial-devel
phabricator - June 1, 2019, 7:55 a.m.
av6 added a comment.


  This change looks good, but I have doubts about "visible" in the docstring. https://phab.mercurial-scm.org/rHG1858fc2327ef7b631941e37550738f1fc4217bfb does say that this template keyword respects repo filtering, but I've encountered instances where it shows hidden predecessors (that need --hidden to be seen).

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D6467

To: joerg.sonnenberger, #hg-reviewers
Cc: av6, mercurial-devel

Patch

diff --git a/mercurial/templatekw.py b/mercurial/templatekw.py
--- a/mercurial/templatekw.py
+++ b/mercurial/templatekw.py
@@ -572,7 +572,7 @@ 
 
 @templatekeyword("predecessors", requires={'repo', 'ctx'})
 def showpredecessors(context, mapping):
-    """Returns the list of the closest visible successors. (EXPERIMENTAL)"""
+    """Returns the list of the closest visible predecessors. (EXPERIMENTAL)"""
     repo = context.resource(mapping, 'repo')
     ctx = context.resource(mapping, 'ctx')
     predecessors = sorted(obsutil.closestpredecessors(repo, ctx.node()))