~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/remote.py

  • Committer: Robert Collins
  • Date: 2009-02-23 05:12:05 UTC
  • mto: This revision was merged to the branch mainline in revision 4038.
  • Revision ID: robertc@robertcollins.net-20090223051205-92ypm6chik138tpy
Add a BranchFormat.network_name() method as preparation for creating branches via RPC calls.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1467
1467
    def get_format_string(self):
1468
1468
        return 'Remote BZR Branch'
1469
1469
 
 
1470
    def network_name(self):
 
1471
        return self._network_name
 
1472
 
1470
1473
    def open(self, a_bzrdir):
1471
1474
        return a_bzrdir.open_branch()
1472
1475
 
1539
1542
        self._repo_lock_token = None
1540
1543
        self._lock_count = 0
1541
1544
        self._leave_lock = False
 
1545
        if real_branch is not None:
 
1546
            self._format._network_name = \
 
1547
                self._real_branch._format.network_name()
 
1548
        else:
 
1549
            # XXX: Need to get this from BzrDir.open_branch's return value.
 
1550
            self._ensure_real()
 
1551
            self._format._network_name = \
 
1552
                self._real_branch._format.network_name()
1542
1553
        # The base class init is not called, so we duplicate this:
1543
1554
        hooks = branch.Branch.hooks['open']
1544
1555
        for hook in hooks: