~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: 2008-08-28 21:23:28 UTC
  • mfrom: (3650.2.5 sprout)
  • Revision ID: pqm@pqm.ubuntu.com-20080828212328-q4mx5qgvrokx06c0
Clean up BzrDir.sprout (abentley)

Show diffs side-by-side

added added

removed removed

Lines of Context:
679
679
    @needs_read_lock
680
680
    def sprout(self, to_bzrdir, revision_id=None):
681
681
        """Create a new line of development from the branch, into to_bzrdir.
682
 
        
 
682
 
 
683
        to_bzrdir controls the branch format.
 
684
 
683
685
        revision_id: if not None, the revision history in the new branch will
684
686
                     be truncated to end with revision_id.
685
687
        """
686
 
        result = self._format.initialize(to_bzrdir)
 
688
        result = to_bzrdir.create_branch()
687
689
        self.copy_content_into(result, revision_id=revision_id)
688
690
        result.set_parent(self.bzrdir.root_transport.base)
689
691
        return result