~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bzrdir.py

  • Committer: Neil Martinsen-Burrell
  • Date: 2011-12-11 04:11:49 UTC
  • mto: This revision was merged to the branch mainline in revision 6356.
  • Revision ID: nmb@wartburg.edu-20111211041149-iina5f13plnhh065
implement list_branches in terms of get_branches

Show diffs side-by-side

added added

removed removed

Lines of Context:
1046
1046
                self.control_files.unlock()
1047
1047
        self.transport.delete_tree(path)
1048
1048
 
1049
 
    def list_branches(self):
1050
 
        """See ControlDir.list_branches."""
1051
 
        ret = []
1052
 
        # Default branch
1053
 
        try:
1054
 
            ret.append(self.open_branch())
1055
 
        except (errors.NotBranchError, errors.NoRepositoryPresent):
1056
 
            pass
1057
 
 
1058
 
        # colocated branches
1059
 
        ret.extend([self.open_branch(name.decode("utf-8")) for name in
1060
 
                    self._read_branch_list()])
1061
 
        return ret
1062
 
 
1063
1049
    def get_branches(self):
1064
1050
        """See ControlDir.get_branches."""
1065
1051
        ret = {}