Mercurial > hg-stable
changeset 6722:197d54d82f8d
get repo.branchheads() to use working directory's branch by default
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Mon, 23 Jun 2008 15:03:22 +0200 |
parents | 521c6c6f3b9b |
children | 1fe6f365df2e |
files | mercurial/localrepo.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/localrepo.py Mon Jun 23 13:12:32 2008 +0200 +++ b/mercurial/localrepo.py Mon Jun 23 15:03:22 2008 +0200 @@ -1204,7 +1204,8 @@ heads.sort() return [n for (r, n) in heads] - def branchheads(self, branch, start=None): + def branchheads(self, branch=None, start=None): + branch = branch or self.workingctx().branch() branches = self.branchtags() if branch not in branches: return []