Mercurial > public > mercurial-scm > hg-stable
diff mercurial/localrepo.py @ 8796:2bcef677a6c3
localrepo: remove 'closed' argument to heads(...) function
- repository heads are not associated with the closed attribute, so
remove it making the code in line with the concept.
- Fix functions that were calling heads with the parameter.
- Adjust webcommands.branches to include the concept of inactive
as well as open and closed branches
- Fix code and docstrings in commands to make the correct use of
closed branches & branch heads clearer
- Improve grammar of 'hg heads' help text (2nd submission)
this does not alter the cli for hg branches, that work is
still to be done
author | John Mulligan <phlogistonjohn@asynchrono.us> |
---|---|
date | Wed, 10 Jun 2009 19:11:49 -0400 |
parents | f037187a6f68 |
children | 9ed150d2fbd5 |
line wrap: on
line diff
--- a/mercurial/localrepo.py Mon Jun 08 20:02:44 2009 +0200 +++ b/mercurial/localrepo.py Wed Jun 10 19:11:49 2009 -0400 @@ -1134,15 +1134,10 @@ finally: wlock.release() - def heads(self, start=None, closed=False): + def heads(self, start=None): heads = self.changelog.heads(start) - def display(head): - if closed: - return True - extras = self.changelog.read(head)[5] - return ('close' not in extras) # sort the output in rev descending order - heads = [(-self.changelog.rev(h), h) for h in heads if display(h)] + heads = [(-self.changelog.rev(h), h) for h in heads] return [n for (r, n) in sorted(heads)] def branchheads(self, branch=None, start=None, closed=False):