mercurial/localrepo.py
changeset 8694 ca8d05e1f1d1
parent 8680 b6511055d37b
child 8699 f364cc1d98c4
equal deleted inserted replaced
8693:68e0a55eee6e 8694:ca8d05e1f1d1
  1111                     self.dirstate.add(dest)
  1111                     self.dirstate.add(dest)
  1112                 self.dirstate.copy(source, dest)
  1112                 self.dirstate.copy(source, dest)
  1113             finally:
  1113             finally:
  1114                 wlock.release()
  1114                 wlock.release()
  1115 
  1115 
  1116     def heads(self, start=None, closed=True):
  1116     def heads(self, start=None, closed=False):
  1117         heads = self.changelog.heads(start)
  1117         heads = self.changelog.heads(start)
  1118         def display(head):
  1118         def display(head):
  1119             if closed:
  1119             if closed:
  1120                 return True
  1120                 return True
  1121             extras = self.changelog.read(head)[5]
  1121             extras = self.changelog.read(head)[5]
  1122             return ('close' not in extras)
  1122             return ('close' not in extras)
  1123         # sort the output in rev descending order
  1123         # sort the output in rev descending order
  1124         heads = [(-self.changelog.rev(h), h) for h in heads if display(h)]
  1124         heads = [(-self.changelog.rev(h), h) for h in heads if display(h)]
  1125         return [n for (r, n) in sorted(heads)]
  1125         return [n for (r, n) in sorted(heads)]
  1126 
  1126 
  1127     def branchheads(self, branch=None, start=None, closed=True):
  1127     def branchheads(self, branch=None, start=None, closed=False):
  1128         if branch is None:
  1128         if branch is None:
  1129             branch = self[None].branch()
  1129             branch = self[None].branch()
  1130         branches = self.branchmap()
  1130         branches = self.branchmap()
  1131         if branch not in branches:
  1131         if branch not in branches:
  1132             return []
  1132             return []