/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/branch.py

  • Committer: Vincent Ladeuil
  • Date: 2007-11-01 21:02:36 UTC
  • mto: (2990.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 2991.
  • Revision ID: v.ladeuil+lp@free.fr-20071101210236-iv2k87h4g2dmig3t
Fix second unwanted connection by providing the right branch to create_checkout.

* bzrlib/branch.py:
(Branch.create_checkout): Keep the lightweight branch to create
the checkout from.

* bzrlib/bzrdir.py:
(BzrDir.create_workingtree, BzrDir.open_workingtree,
BzrDirMeta1.create_workingtree): Add a from_branch parameter for
lightweight checkouts purposes.

* bzrlib/workingtree.py:
(WorkingTreeFormat2.initialize, WorkingTreeFormat3.initialize):
Use from_branch if provided or default to bzrdir branch.

* bzrlib/workingtree_4.py:
(WorkingTreeFormat4.initialize): Use from_branch if provided or
default to bzrdir branch.

* bzrlib/tests/test_workingtree.py:
(SampleTreeFormat.initialize): Update the signature.

* bzrlib/remote.py:
(RemoteBzrDir.create_workingtree): Update the signature.

Show diffs side-by-side

added added

removed removed

Lines of Context:
771
771
        if lightweight:
772
772
            format = self._get_checkout_format()
773
773
            checkout = format.initialize_on_transport(t)
774
 
            BranchReferenceFormat().initialize(checkout, self)
 
774
            from_branch = BranchReferenceFormat().initialize(checkout, self)
775
775
        else:
776
776
            format = self._get_checkout_format()
777
777
            checkout_branch = bzrdir.BzrDir.create_branch_convenience(
781
781
            # pull up to the specified revision_id to set the initial 
782
782
            # branch tip correctly, and seed it with history.
783
783
            checkout_branch.pull(self, stop_revision=revision_id)
784
 
        tree = checkout.create_workingtree(revision_id)
 
784
            from_branch=None
 
785
        tree = checkout.create_workingtree(revision_id,
 
786
                                           from_branch=from_branch)
785
787
        basis_tree = tree.basis_tree()
786
788
        basis_tree.lock_read()
787
789
        try: