diff -r a14d93b2fb1b -r 7d4219512823 mercurial/changelog.py --- a/mercurial/changelog.py Mon Nov 11 21:16:54 2013 +1100 +++ b/mercurial/changelog.py Mon Sep 16 01:08:29 2013 -0700 @@ -342,9 +342,10 @@ text = "\n".join(l) return self.addrevision(text, transaction, len(self), p1, p2) - def branch(self, rev): - """return the branch of a revision + def branchinfo(self, rev): + """return the branch name and open/close state of a revision This function exists because creating a changectx object just to access this is costly.""" - return encoding.tolocal(self.read(rev)[5].get("branch")) + extra = self.read(rev)[5] + return encoding.tolocal(extra.get("branch")), 'close' in extra