~mbp/bzr/doc-old

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-03-03 08:54:13 UTC
  • mfrom: (4070.2.8 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20090303085413-35seprvnu885xorz
(robertc) Create new server verb BzrDir.cloning_metadir and alter
        Branch.sprout to prevent race conditions during stacked
        branching. (Robert Collins, Andrew Bennetts)

Show diffs side-by-side

added added

removed removed

Lines of Context:
892
892
        return  result
893
893
 
894
894
    @needs_read_lock
895
 
    def sprout(self, to_bzrdir, revision_id=None):
 
895
    def sprout(self, to_bzrdir, revision_id=None, repository_policy=None):
896
896
        """Create a new line of development from the branch, into to_bzrdir.
897
897
 
898
898
        to_bzrdir controls the branch format.
901
901
                     be truncated to end with revision_id.
902
902
        """
903
903
        result = to_bzrdir.create_branch()
 
904
        if repository_policy is not None:
 
905
            repository_policy.configure_branch(result)
904
906
        self.copy_content_into(result, revision_id=revision_id)
905
907
        result.set_parent(self.bzrdir.root_transport.base)
906
908
        return result
1709
1711
network_format_registry = registry.FormatRegistry()
1710
1712
"""Registry of formats indexed by their network name.
1711
1713
 
1712
 
The network name for a repository format is an identifier that can be used when
 
1714
The network name for a branch format is an identifier that can be used when
1713
1715
referring to formats with smart server operations. See
1714
1716
BranchFormat.network_name() for more detail.
1715
1717
"""