~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bzrdir.py

  • Committer: Jelmer Vernooij
  • Date: 2010-08-29 13:42:47 UTC
  • mto: This revision was merged to the branch mainline in revision 5418.
  • Revision ID: jelmer@samba.org-20100829134247-37jrn4qw7siviq51
Move clone() onto ControlDir.clone(), add ControlDir.clone_on_transport() stub.

Show diffs side-by-side

added added

removed removed

Lines of Context:
165
165
                format.get_format_description(),
166
166
                basedir)
167
167
 
168
 
    def clone(self, url, revision_id=None, force_new_repo=False,
169
 
              preserve_stacking=False):
170
 
        """Clone this bzrdir and its contents to url verbatim.
171
 
 
172
 
        :param url: The url create the clone at.  If url's last component does
173
 
            not exist, it will be created.
174
 
        :param revision_id: The tip revision-id to use for any branch or
175
 
            working tree.  If not None, then the clone operation may tune
176
 
            itself to download less data.
177
 
        :param force_new_repo: Do not use a shared repository for the target
178
 
                               even if one is available.
179
 
        :param preserve_stacking: When cloning a stacked branch, stack the
180
 
            new branch on top of the other branch's stacked-on branch.
181
 
        """
182
 
        return self.clone_on_transport(get_transport(url),
183
 
                                       revision_id=revision_id,
184
 
                                       force_new_repo=force_new_repo,
185
 
                                       preserve_stacking=preserve_stacking)
186
 
 
187
168
    def clone_on_transport(self, transport, revision_id=None,
188
169
        force_new_repo=False, preserve_stacking=False, stacked_on=None,
189
170
        create_prefix=False, use_existing_dir=True):