/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/repository.py

  • Committer: Jelmer Vernooij
  • Date: 2017-06-10 16:40:42 UTC
  • mfrom: (6653.6.7 rename-controldir)
  • mto: This revision was merged to the branch mainline in revision 6690.
  • Revision ID: jelmer@jelmer.uk-20170610164042-zrxqgy2htyduvke2
MergeĀ rename-controldirĀ branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
363
363
        super(Repository, self).__init__()
364
364
        self._format = _format
365
365
        # the following are part of the public API for Repository:
366
 
        self.bzrdir = controldir
 
366
        self.controldir = controldir
367
367
        self.control_files = control_files
368
368
        # for tests
369
369
        self._write_group = None
372
372
 
373
373
    @property
374
374
    def user_transport(self):
375
 
        return self.bzrdir.user_transport
 
375
        return self.controldir.user_transport
376
376
 
377
377
    @property
378
378
    def control_transport(self):
545
545
        :param using: If True, list only branches using this repository.
546
546
        """
547
547
        if using and not self.is_shared():
548
 
            return self.bzrdir.list_branches()
 
548
            return self.controldir.list_branches()
549
549
        class Evaluator(object):
550
550
 
551
551
            def __init__(self):
788
788
        dest_repo.fetch(self, revision_id=revision_id)
789
789
        return dest_repo
790
790
 
791
 
    def _create_sprouting_repo(self, a_bzrdir, shared):
792
 
        if not isinstance(a_bzrdir._format, self.bzrdir._format.__class__):
 
791
    def _create_sprouting_repo(self, a_controldir, shared):
 
792
        if not isinstance(a_controldir._format, self.controldir._format.__class__):
793
793
            # use target default format.
794
 
            dest_repo = a_bzrdir.create_repository()
 
794
            dest_repo = a_controldir.create_repository()
795
795
        else:
796
796
            # Most control formats need the repository to be specifically
797
797
            # created, but on some old all-in-one formats it's not needed
798
798
            try:
799
 
                dest_repo = self._format.initialize(a_bzrdir, shared=shared)
 
799
                dest_repo = self._format.initialize(a_controldir, shared=shared)
800
800
            except errors.UninitializableFormat:
801
 
                dest_repo = a_bzrdir.open_repository()
 
801
                dest_repo = a_controldir.open_repository()
802
802
        return dest_repo
803
803
 
804
804
    @needs_read_lock
1173
1173
                return
1174
1174
            warning("Format %s for %s is deprecated -"
1175
1175
                    " please use 'brz upgrade' to get better performance"
1176
 
                    % (self._format, self.bzrdir.transport.base))
 
1176
                    % (self._format, self.controldir.transport.base))
1177
1177
        finally:
1178
1178
            _deprecation_warning_done = True
1179
1179
 
1202
1202
 
1203
1203
    def get_default(self):
1204
1204
        """Return the current default format."""
1205
 
        return controldir.format_registry.make_bzrdir('default').repository_format
 
1205
        return controldir.format_registry.make_controldir('default').repository_format
1206
1206
 
1207
1207
 
1208
1208
network_format_registry = registry.FormatRegistry()
1587
1587
        # this is only useful with metadir layouts - separated repo content.
1588
1588
        # trigger an assertion if not such
1589
1589
        repo._format.get_format_string()
1590
 
        self.repo_dir = repo.bzrdir
 
1590
        self.repo_dir = repo.controldir
1591
1591
        pb.update(gettext('Moving repository to repository.backup'))
1592
1592
        self.repo_dir.transport.move('repository', 'repository.backup')
1593
1593
        backup_transport =  self.repo_dir.transport.clone('repository.backup')