Patchwork D3080: localrepo: use revsymbol in lookupbranch() too

login
register
mail settings
Submitter phabricator
Date April 4, 2018, 10:53 p.m.
Message ID <differential-rev-PHID-DREV-72vnkqr2yg3muzo4nynn-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/30298/
State Superseded
Headers show

Comments

phabricator - April 4, 2018, 10:53 p.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  lookupbranch() takes a string that comes from the CLI, so
  scmutil.revsymbol() is appropriate for looking it up.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/localrepo.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -1023,7 +1023,7 @@ 
         if key in self.branchmap():
             return key
 
-        return self[key].branch()
+        return scmutil.revsymbol(self, key).branch()
 
     def known(self, nodes):
         cl = self.changelog