~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bzrdir.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-02-27 05:58:29 UTC
  • mfrom: (4054.3.1 321695-sprout-typeerror)
  • Revision ID: pqm@pqm.ubuntu.com-20090227055829-spbhpi4ccodki2r4
(mbp) fix #321695 sprouting old branches

Show diffs side-by-side

added added

removed removed

Lines of Context:
1341
1341
 
1342
1342
    def sprout(self, url, revision_id=None, force_new_repo=False,
1343
1343
               possible_transports=None, accelerator_tree=None,
1344
 
               hardlink=False, stacked=False, create_tree_if_local=True):
 
1344
               hardlink=False, stacked=False, create_tree_if_local=True,
 
1345
               source_branch=None):
1345
1346
        """See BzrDir.sprout()."""
 
1347
        if source_branch is not None:
 
1348
            my_branch = self.open_branch()
 
1349
            if source_branch.base != my_branch.base:
 
1350
                raise AssertionError(
 
1351
                    "source branch %r is not within %r with branch %r" %
 
1352
                    (source_branch, self, my_branch))
1346
1353
        if stacked:
1347
1354
            raise errors.UnstackableBranchFormat(
1348
1355
                self._format, self.root_transport.base)