# HG changeset patch # User Brodie Rao # Date 1379318909 25200 # Node ID d5d25e5416372b090cc7dd23d86d6ee6d0e3001f # Parent 1831993d090249b591251fb9aad35fab8161d928 branchmap: introduce iterbranches() method diff -r 1831993d0902 -r d5d25e541637 mercurial/branchmap.py --- 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,