~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/reconfigure.py

  • Committer: Johan Walles
  • Date: 2009-05-07 05:08:46 UTC
  • mfrom: (4342 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4343.
  • Revision ID: johan.walles@gmail.com-20090507050846-nkwvcyauf1eh653q
MergeĀ fromĀ upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
269
269
        if not force:
270
270
            self._check()
271
271
        if self._create_repository:
272
 
            repo = self.bzrdir.create_repository()
 
272
            if self.local_branch and not self._destroy_branch:
 
273
                old_repo = self.local_branch.repository
 
274
            elif self._create_branch and self.referenced_branch is not None:
 
275
                old_repo = self.referenced_branch.repository
 
276
            else:
 
277
                old_repo = None
 
278
            if old_repo is not None:
 
279
                repository_format = old_repo._format
 
280
            else:
 
281
                repository_format = None
 
282
            if repository_format is not None:
 
283
                repo = repository_format.initialize(self.bzrdir)
 
284
            else:
 
285
                repo = self.bzrdir.create_repository()
273
286
            if self.local_branch and not self._destroy_branch:
274
287
                repo.fetch(self.local_branch.repository,
275
288
                           self.local_branch.last_revision())