Mercurial > public > mercurial-scm > hg-stable
diff mercurial/branchmap.py @ 42004:0bd730fbcc2b
branchcache: introduce hasbranch()
This will be used to check whether a branch exists or not. This will optimized
in future.
Differential Revision: https://phab.mercurial-scm.org/D6154
author | Pulkit Goyal <pulkit@yandex-team.ru> |
---|---|
date | Mon, 18 Mar 2019 19:31:45 +0300 |
parents | 7546bf46bfcd |
children | b137a6793c51 |
line wrap: on
line diff
--- a/mercurial/branchmap.py Mon Mar 18 19:11:55 2019 +0300 +++ b/mercurial/branchmap.py Mon Mar 18 19:31:45 2019 +0300 @@ -175,6 +175,10 @@ def iteritems(self): return self.entries.iteritems() + def hasbranch(self, label): + """ checks whether a branch of this name exists or not """ + return label in self.entries + @classmethod def fromfile(cls, repo): f = None