diff mercurial/localrepo.py @ 8694:ca8d05e1f1d1

localrepo: set heads and branchheads to be closed=False by default The heads(...) and branchheads(...) functions will now only return closed heads when explicitly asked for them. This will cause 'hg merge' to have better behavior in the presence of a branch that has closed heads when no explicit rev is passed.
author John Mulligan <phlogistonjohn@asynchrono.us>
date Wed, 03 Jun 2009 13:42:55 +0200
parents b6511055d37b
children f364cc1d98c4
line wrap: on
line diff
--- a/mercurial/localrepo.py	Mon Jun 01 17:12:42 2009 +0200
+++ b/mercurial/localrepo.py	Wed Jun 03 13:42:55 2009 +0200
@@ -1113,7 +1113,7 @@
             finally:
                 wlock.release()
 
-    def heads(self, start=None, closed=True):
+    def heads(self, start=None, closed=False):
         heads = self.changelog.heads(start)
         def display(head):
             if closed:
@@ -1124,7 +1124,7 @@
         heads = [(-self.changelog.rev(h), h) for h in heads if display(h)]
         return [n for (r, n) in sorted(heads)]
 
-    def branchheads(self, branch=None, start=None, closed=True):
+    def branchheads(self, branch=None, start=None, closed=False):
         if branch is None:
             branch = self[None].branch()
         branches = self.branchmap()