/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/branch.py

Add a 'brz clone' command.

Merged from https://code.launchpad.net/~jelmer/brz/clone/+merge/379369

Show diffs side-by-side

added added

removed removed

Lines of Context:
1194
1194
        if revno < 1 or revno > self.revno():
1195
1195
            raise errors.InvalidRevisionNumber(revno)
1196
1196
 
1197
 
    def clone(self, to_controldir, revision_id=None, repository_policy=None,
1198
 
              tag_selector=None):
 
1197
    def clone(self, to_controldir, revision_id=None, name=None,
 
1198
              repository_policy=None, tag_selector=None):
1199
1199
        """Clone this branch into to_controldir preserving all semantic values.
1200
1200
 
1201
1201
        Most API users will want 'create_clone_on_transport', which creates a
1204
1204
        revision_id: if not None, the revision history in the new branch will
1205
1205
                     be truncated to end with revision_id.
1206
1206
        """
1207
 
        result = to_controldir.create_branch()
 
1207
        result = to_controldir.create_branch(name=name)
1208
1208
        with self.lock_read(), result.lock_write():
1209
1209
            if repository_policy is not None:
1210
1210
                repository_policy.configure_branch(result)