~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bzrdir.py

  • Committer: Martin Pool
  • Date: 2007-04-23 09:52:50 UTC
  • mto: (2018.18.24 hpss-faster-copy)
  • mto: This revision was merged to the branch mainline in revision 2462.
  • Revision ID: mbp@sourcefrog.net-20070423095250-xzaleukzs05x9lp0
Add new Repository.sprout,

Cleaner in intention and purpose than copy_content_into.  It doesn't copy the
extra settings of the repository (like working-trees and shared), which is
normally what you'll want.

Show diffs side-by-side

added added

removed removed

Lines of Context:
781
781
            result.create_repository()
782
782
        elif source_repository is not None and result_repo is None:
783
783
            # have source, and want to make a new target repo
784
 
            # we don't clone the repo because that preserves attributes
785
 
            # like is_shared(), and we have not yet implemented a 
786
 
            # repository sprout().
787
 
            result_repo = result.create_repository()
788
 
        if result_repo is not None:
 
784
            result_repo = source_repository.sprout(result, revision_id=revision_id)
 
785
        else:
789
786
            # fetch needed content into target.
790
787
            if source_repository is not None:
791
788
                result_repo.fetch(source_repository, revision_id=revision_id)