equal
deleted
inserted
replaced
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().entries: |
1559 if self.branchmap().hasbranch(key): |
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.entries: |
2733 if not branches.hasbranch(branch): |
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 |