Patchwork D3195: context: handle partial nodeids in revsymbol()

login
register
mail settings
Submitter phabricator
Date April 11, 2018, 12:32 p.m.
Message ID <1eb7737170820010dcacf319c589e66c@localhost.localdomain>
Download mbox | patch
Permalink /patch/30692/
State Not Applicable
Headers show

Comments

phabricator - April 11, 2018, 12:32 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG35b34202dd3b: context: handle partial nodeids in revsymbol() (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3195?vs=7887&id=7976

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

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
@@ -498,6 +498,11 @@ 
         except KeyError:
             pass
 
+        node = repo.unfiltered().changelog._partialmatch(symbol)
+        if node is not None:
+            rev = repo.changelog.rev(node)
+            return repo[rev]
+
         return repo[symbol]
 
     except error.WdirUnsupported: