~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bzrdir.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-06-18 05:13:43 UTC
  • mfrom: (4456.2.1 default-stacking-again)
  • Revision ID: pqm@pqm.ubuntu.com-20090618051343-c9ltrfncx8hvw729
(andrew) Fix branch format upgrades triggered by default stacking
        policy on a smart server.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2358
2358
    def set_branch_format(self, format):
2359
2359
        self._branch_format = format
2360
2360
 
2361
 
    def require_stacking(self, stack_on=None, possible_transports=None):
 
2361
    def require_stacking(self, stack_on=None, possible_transports=None,
 
2362
            _skip_repo=False):
2362
2363
        """We have a request to stack, try to ensure the formats support it.
2363
2364
 
2364
2365
        :param stack_on: If supplied, it is the URL to a branch that we want to
2402
2403
            target[:] = [target_branch, True, False]
2403
2404
            return target
2404
2405
 
2405
 
        if not (self.repository_format.supports_external_lookups):
 
2406
        if (not _skip_repo and
 
2407
                 not self.repository_format.supports_external_lookups):
2406
2408
            # We need to upgrade the Repository.
2407
2409
            target_branch, _, do_upgrade = get_target_branch()
2408
2410
            if target_branch is None:
3268
3270
        else:
3269
3271
            remote_repo = None
3270
3272
            policy = None
 
3273
        if require_stacking:
 
3274
            # The repo has already been created, but we need to make sure that
 
3275
            # we'll make a stackable branch.
 
3276
            bzrdir._format.require_stacking(_skip_repo=True)
3271
3277
        return remote_repo, bzrdir, require_stacking, policy
3272
3278
 
3273
3279
    def _open(self, transport):