~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/clone.py

  • Committer: Martin Pool
  • Date: 2005-10-06 04:09:55 UTC
  • mfrom: (1413)
  • mto: (1185.13.3)
  • mto: This revision was merged to the branch mainline in revision 1417.
  • Revision ID: mbp@sourcefrog.net-20051006040955-36f27e5a8d5c977b
[merge] from robert

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
    assert isinstance(to_location, basestring)
76
76
    if basis_branch is not None:
77
77
        note("basis_branch is not supported for fast weave copy yet.")
 
78
    if not (branch_from.weave_store.listable()
 
79
            and branch_from.revision_store.listable()):
 
80
        return copy_branch_slower(branch_from, to_location, revision,
 
81
                                  basis_branch)
78
82
    history = _get_truncated_history(branch_from, revision)
79
83
    if not bzrlib.osutils.lexists(to_location):
80
84
        os.mkdir(to_location)
91
95
    return branch_to
92
96
 
93
97
 
94
 
 
95
98
def _get_truncated_history(branch_from, revision):
96
99
    history = branch_from.revision_history()
97
100
    if revision is None:
104
107
    return history[:idx+1]
105
108
 
106
109
def _copy_text_weaves(branch_from, branch_to):
107
 
    # TODO: Handle UnlistableStore and fall back to getting a list of 
108
 
    # all file-ids and copying them one by one.
109
110
    copy_all(branch_from.weave_store, branch_to.weave_store)
110
111
 
111
112
 
112
113
def _copy_revision_store(branch_from, branch_to):
113
 
    # TODO: Copy all revisions mentioned in the ancestry of the selected revision
114
114
    copy_all(branch_from.revision_store, branch_to.revision_store)
115
115
 
116
116