/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/bzrdir.py

  • Committer: Jelmer Vernooij
  • Date: 2010-03-02 22:25:58 UTC
  • mto: This revision was merged to the branch mainline in revision 5085.
  • Revision ID: jelmer@samba.org-20100302222558-n7dr3fccme9an18t
Pass colocated branch name around in more places.

Show diffs side-by-side

added added

removed removed

Lines of Context:
715
715
        """
716
716
        return None
717
717
 
718
 
    def get_branch_transport(self, branch_format):
 
718
    def get_branch_transport(self, branch_format, name=None):
719
719
        """Get the transport for use by branch format in this BzrDir.
720
720
 
721
721
        Note that bzr dirs that do not support format strings will raise
1383
1383
 
1384
1384
    def create_branch(self, name=None):
1385
1385
        """See BzrDir.create_branch."""
1386
 
        if name is not None:
1387
 
            raise errors.NoColocatedBranchSupport(self)
1388
 
        return self._format.get_branch_format().initialize(self)
 
1386
        return self._format.get_branch_format().initialize(self, name=name)
1389
1387
 
1390
1388
    def destroy_branch(self, name=None):
1391
1389
        """See BzrDir.destroy_branch."""
1449
1447
        raise errors.UnsupportedOperation(self.destroy_workingtree_metadata,
1450
1448
                                          self)
1451
1449
 
1452
 
    def get_branch_transport(self, branch_format):
 
1450
    def get_branch_transport(self, branch_format, name=None):
1453
1451
        """See BzrDir.get_branch_transport()."""
 
1452
        if name is not None:
 
1453
            raise errors.NoColocatedBranchSupport(self)
1454
1454
        if branch_format is None:
1455
1455
            return self.transport
1456
1456
        try:
1622
1622
 
1623
1623
    def create_branch(self, name=None):
1624
1624
        """See BzrDir.create_branch."""
1625
 
        if name is not None:
1626
 
            raise errors.NoColocatedBranchSupport(self)
1627
 
        return self._format.get_branch_format().initialize(self)
 
1625
        return self._format.get_branch_format().initialize(self, name=name)
1628
1626
 
1629
1627
    def destroy_branch(self, name=None):
1630
1628
        """See BzrDir.create_branch."""
1678
1676
        format = BranchFormat.find_format(self)
1679
1677
        return format.get_reference(self)
1680
1678
 
1681
 
    def get_branch_transport(self, branch_format):
 
1679
    def get_branch_transport(self, branch_format, name=None):
1682
1680
        """See BzrDir.get_branch_transport()."""
 
1681
        if name is not None:
 
1682
            raise errors.NoColocatedBranchSupport(self)
1683
1683
        # XXX: this shouldn't implicitly create the directory if it's just
1684
1684
        # promising to get a transport -- mbp 20090727
1685
1685
        if branch_format is None: