~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/clone.py

  • Committer: Robert Collins
  • Date: 2005-10-04 04:38:48 UTC
  • mfrom: (1400.1.1)
  • Revision ID: robertc@robertcollins.net-20051004043848-d65bb5f9d435fbb3
unbreak http branch operations

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
    print "xxxxxxxxxxx", branch_from.weave_store.listable(), branch_from.weave_store
 
79
    if not (branch_from.weave_store.listable()
 
80
            and branch_from.revision_store.listable()):
 
81
        return copy_branch_slower(branch_from, to_location, revision,
 
82
                                  basis_branch)
78
83
    history = _get_truncated_history(branch_from, revision)
79
84
    if not bzrlib.osutils.lexists(to_location):
80
85
        os.mkdir(to_location)
91
96
    return branch_to
92
97
 
93
98
 
94
 
 
95
99
def _get_truncated_history(branch_from, revision):
96
100
    history = branch_from.revision_history()
97
101
    if revision is None:
104
108
    return history[:idx+1]
105
109
 
106
110
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
111
    copy_all(branch_from.weave_store, branch_to.weave_store)
110
112
 
111
113
 
112
114
def _copy_revision_store(branch_from, branch_to):
113
 
    # TODO: Copy all revisions mentioned in the ancestry of the selected revision
114
115
    copy_all(branch_from.revision_store, branch_to.revision_store)
115
116
 
116
117