Mercurial > hg
changeset 37351:fdd22bf6398f
localrepo: drop "remote" argument from lookupbranch() (API)
According to `hg grep --all lookupbranch`, the "remote" argument has
never been used ever since it was introduced in ca739acf1a98
(commands: add more robust support for 'hg log -b' (issue2078),
2010-04-12).
Differential Revision: https://phab.mercurial-scm.org/D3079
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Wed, 04 Apr 2018 14:31:09 -0700 |
parents | e32dfff71529 |
children | 92171562c7f3 |
files | mercurial/localrepo.py mercurial/repository.py |
diffstat | 2 files changed, 4 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/localrepo.py Sun Apr 01 22:48:32 2018 -0700 +++ b/mercurial/localrepo.py Wed Apr 04 14:31:09 2018 -0700 @@ -1019,13 +1019,11 @@ def lookup(self, key): return scmutil.revsymbol(self, key).node() - def lookupbranch(self, key, remote=None): - repo = remote or self - if key in repo.branchmap(): + def lookupbranch(self, key): + if key in self.branchmap(): return key - repo = (remote and remote.local()) and remote or self - return repo[key].branch() + return self[key].branch() def known(self, nodes): cl = self.changelog
--- a/mercurial/repository.py Sun Apr 01 22:48:32 2018 -0700 +++ b/mercurial/repository.py Wed Apr 04 14:31:09 2018 -0700 @@ -446,7 +446,7 @@ def lookup(key): """Resolve the node for a revision.""" - def lookupbranch(key, remote=None): + def lookupbranch(key): """Look up the branch name of the given revision or branch name.""" def known(nodes):