~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/remote.py

  • Committer: Aaron Bentley
  • Date: 2010-05-10 11:34:20 UTC
  • mfrom: (5218 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5221.
  • Revision ID: aaron@aaronbentley.com-20100510113420-toh2d5yioobb5uq1
Merged bzr.dev into transform-commit-full.

Show diffs side-by-side

added added

removed removed

Lines of Context:
272
272
    def create_workingtree(self, revision_id=None, from_branch=None):
273
273
        raise errors.NotLocalUrl(self.transport.base)
274
274
 
275
 
    def find_branch_format(self):
 
275
    def find_branch_format(self, name=None):
276
276
        """Find the branch 'format' for this bzrdir.
277
277
 
278
278
        This might be a synthetic object for e.g. RemoteBranch and SVN.
279
279
        """
280
 
        b = self.open_branch()
 
280
        b = self.open_branch(name=name)
281
281
        return b._format
282
282
 
283
 
    def get_branch_reference(self):
 
283
    def get_branch_reference(self, name=None):
284
284
        """See BzrDir.get_branch_reference()."""
 
285
        if name is not None:
 
286
            # XXX JRV20100304: Support opening colocated branches
 
287
            raise errors.NoColocatedBranchSupport(self)
285
288
        response = self._get_branch_reference()
286
289
        if response[0] == 'ref':
287
290
            return response[1]
318
321
            raise errors.UnexpectedSmartServerResponse(response)
319
322
        return response
320
323
 
321
 
    def _get_tree_branch(self):
 
324
    def _get_tree_branch(self, name=None):
322
325
        """See BzrDir._get_tree_branch()."""
323
 
        return None, self.open_branch()
 
326
        return None, self.open_branch(name=name)
324
327
 
325
328
    def open_branch(self, name=None, unsupported=False,
326
329
                    ignore_fallbacks=False):
1306
1309
        return self._real_repository.make_working_trees()
1307
1310
 
1308
1311
    def refresh_data(self):
1309
 
        """Re-read any data needed to to synchronise with disk.
 
1312
        """Re-read any data needed to synchronise with disk.
1310
1313
 
1311
1314
        This method is intended to be called after another repository instance
1312
1315
        (such as one used by a smart server) has inserted data into the
1313
 
        repository. It may not be called during a write group, but may be
1314
 
        called at any other time.
 
1316
        repository. On all repositories this will work outside of write groups.
 
1317
        Some repository formats (pack and newer for bzrlib native formats)
 
1318
        support refresh_data inside write groups. If called inside a write
 
1319
        group on a repository that does not support refreshing in a write group
 
1320
        IsInWriteGroupError will be raised.
1315
1321
        """
1316
 
        if self.is_in_write_group():
1317
 
            raise errors.InternalBzrError(
1318
 
                "May not refresh_data while in a write group.")
1319
1322
        if self._real_repository is not None:
1320
1323
            self._real_repository.refresh_data()
1321
1324