mercurial/localrepo.py
changeset 42001 624d6683c705
parent 41934 481259af4bdf
child 42004 0bd730fbcc2b
equal deleted inserted replaced
42000:a66965406528 42001:624d6683c705
  1554 
  1554 
  1555     def lookup(self, key):
  1555     def lookup(self, key):
  1556         return scmutil.revsymbol(self, key).node()
  1556         return scmutil.revsymbol(self, key).node()
  1557 
  1557 
  1558     def lookupbranch(self, key):
  1558     def lookupbranch(self, key):
  1559         if key in self.branchmap():
  1559         if key in self.branchmap().entries:
  1560             return key
  1560             return key
  1561 
  1561 
  1562         return scmutil.revsymbol(self, key).branch()
  1562         return scmutil.revsymbol(self, key).branch()
  1563 
  1563 
  1564     def known(self, nodes):
  1564     def known(self, nodes):
  2728         If closed is True, return heads that are marked as closed as well.
  2728         If closed is True, return heads that are marked as closed as well.
  2729         '''
  2729         '''
  2730         if branch is None:
  2730         if branch is None:
  2731             branch = self[None].branch()
  2731             branch = self[None].branch()
  2732         branches = self.branchmap()
  2732         branches = self.branchmap()
  2733         if branch not in branches:
  2733         if branch not in branches.entries:
  2734             return []
  2734             return []
  2735         # the cache returns heads ordered lowest to highest
  2735         # the cache returns heads ordered lowest to highest
  2736         bheads = list(reversed(branches.branchheads(branch, closed=closed)))
  2736         bheads = list(reversed(branches.branchheads(branch, closed=closed)))
  2737         if start is not None:
  2737         if start is not None:
  2738             # filter out the heads that cannot be reached from startrev
  2738             # filter out the heads that cannot be reached from startrev