Mercurial > hg-stable
changeset 20190:d5d25e541637
branchmap: introduce iterbranches() method
author | Brodie Rao <brodie@sf.io> |
---|---|
date | Mon, 16 Sep 2013 01:08:29 -0700 |
parents | 1831993d0902 |
children | cbe2bcc927cd |
files | mercurial/branchmap.py |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/branchmap.py Mon Sep 16 01:08:29 2013 -0700 +++ b/mercurial/branchmap.py Mon Sep 16 01:08:29 2013 -0700 @@ -185,6 +185,10 @@ heads = [h for h in heads if h not in self._closednodes] return heads + def iterbranches(self): + for bn, heads in self.iteritems(): + yield (bn, heads) + self._branchtip(heads) + def copy(self): """return an deep copy of the branchcache object""" return branchcache(self, self.tipnode, self.tiprev, self.filteredhash,