Patchwork D3308: scmutil: document that isrevsymbol() raises on ambiguous node prefix

login
register
mail settings
Submitter phabricator
Date April 13, 2018, 6 p.m.
Message ID <differential-rev-PHID-DREV-o3hvbgyfnxweg2f54rkd-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/30856/
State Superseded
Headers show

Comments

phabricator - April 13, 2018, 6 p.m.
martinvonz 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/D3308

AFFECTED FILES
  mercurial/scmutil.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -444,6 +444,11 @@ 
     return node
 
 def isrevsymbol(repo, symbol):
+    """Checks if a symbol exists in the repo.
+
+       See revsymbol() for details. Raises error.LookupError if the symbol is an
+       an ambiguous nodeid prefix.
+    """
     try:
         revsymbol(repo, symbol)
         return True