~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-05-06 09:10:02 UTC
  • mfrom: (5816.6.19 bazaar_source)
  • Revision ID: pqm@pqm.ubuntu.com-20110506091002-ge55v96dgz9hfz67
(vila) Set correct parent when using 'switch -b' with bound branches (Fix
 for Bug #513709). (Dr Al)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1271
1271
            if repository_policy is not None:
1272
1272
                repository_policy.configure_branch(result)
1273
1273
            self.copy_content_into(result, revision_id=revision_id)
1274
 
            result.set_parent(self.bzrdir.root_transport.base)
 
1274
            master_branch = self.get_master_branch()
 
1275
            if master_branch is None:
 
1276
                result.set_parent(self.bzrdir.root_transport.base)
 
1277
            else:
 
1278
                result.set_parent(master_branch.bzrdir.root_transport.base)
1275
1279
        finally:
1276
1280
            result.unlock()
1277
1281
        return result