~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repofmt/knitrepo.py

  • Committer: Jelmer Vernooij
  • Date: 2016-04-03 16:32:31 UTC
  • mto: This revision was merged to the branch mainline in revision 6617.
  • Revision ID: jelmer@jelmer.uk-20160403163231-h72bo0uyek2gikw0
Don't put French text in doc/en/user-reference when LANGUAGE=fr_CH.UTF_8.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
 
17
from __future__ import absolute_import
 
18
 
17
19
from bzrlib.lazy_import import lazy_import
18
20
lazy_import(globals(), """
19
21
import itertools
20
22
 
21
23
from bzrlib import (
22
 
    bzrdir,
 
24
    controldir,
23
25
    errors,
24
26
    knit as _mod_knit,
25
27
    lockable_files,
38
40
from bzrlib.repository import (
39
41
    InterRepository,
40
42
    IsInWriteGroupError,
41
 
    RepositoryFormat,
 
43
    RepositoryFormatMetaDir,
42
44
    )
43
45
from bzrlib.vf_repository import (
44
46
    InterSameDataRepository,
321
323
                                    than normal. I.e. during 'upgrade'.
322
324
        """
323
325
        if not _found:
324
 
            format = RepositoryFormat.find_format(a_bzrdir)
 
326
            format = RepositoryFormatMetaDir.find_format(a_bzrdir)
325
327
        if _override_transport is not None:
326
328
            repo_transport = _override_transport
327
329
        else:
367
369
    def __ne__(self, other):
368
370
        return self.__class__ is not other.__class__
369
371
 
370
 
    def get_format_string(self):
 
372
    @classmethod
 
373
    def get_format_string(cls):
371
374
        """See RepositoryFormat.get_format_string()."""
372
375
        return "Bazaar-NG Knit Repository Format 1"
373
376
 
402
405
        return xml7.serializer_v7
403
406
 
404
407
    def _get_matching_bzrdir(self):
405
 
        return bzrdir.format_registry.make_bzrdir('dirstate-with-subtree')
 
408
        return controldir.format_registry.make_bzrdir('dirstate-with-subtree')
406
409
 
407
410
    def _ignore_setting_bzrdir(self, format):
408
411
        pass
409
412
 
410
413
    _matchingbzrdir = property(_get_matching_bzrdir, _ignore_setting_bzrdir)
411
414
 
412
 
    def get_format_string(self):
 
415
    @classmethod
 
416
    def get_format_string(cls):
413
417
        """See RepositoryFormat.get_format_string()."""
414
418
        return "Bazaar Knit Repository Format 3 (bzr 0.15)\n"
415
419
 
443
447
        return xml6.serializer_v6
444
448
 
445
449
    def _get_matching_bzrdir(self):
446
 
        return bzrdir.format_registry.make_bzrdir('rich-root')
 
450
        return controldir.format_registry.make_bzrdir('rich-root')
447
451
 
448
452
    def _ignore_setting_bzrdir(self, format):
449
453
        pass
450
454
 
451
455
    _matchingbzrdir = property(_get_matching_bzrdir, _ignore_setting_bzrdir)
452
456
 
453
 
    def get_format_string(self):
 
457
    @classmethod
 
458
    def get_format_string(cls):
454
459
        """See RepositoryFormat.get_format_string()."""
455
460
        return 'Bazaar Knit Repository Format 4 (bzr 1.0)\n'
456
461
 
483
488
 
484
489
    @needs_read_lock
485
490
    def search_missing_revision_ids(self,
486
 
            revision_id=symbol_versioning.DEPRECATED_PARAMETER,
487
491
            find_ghosts=True, revision_ids=None, if_present_ids=None,
488
492
            limit=None):
489
493
        """See InterRepository.search_missing_revision_ids()."""
490
 
        if symbol_versioning.deprecated_passed(revision_id):
491
 
            symbol_versioning.warn(
492
 
                'search_missing_revision_ids(revision_id=...) was '
493
 
                'deprecated in 2.4.  Use revision_ids=[...] instead.',
494
 
                DeprecationWarning, stacklevel=2)
495
 
            if revision_ids is not None:
496
 
                raise AssertionError(
497
 
                    'revision_ids is mutually exclusive with revision_id')
498
 
            if revision_id is not None:
499
 
                revision_ids = [revision_id]
500
 
        del revision_id
501
494
        source_ids_set = self._present_source_revisions_for(
502
495
            revision_ids, if_present_ids)
503
496
        # source_ids is the worst possible case we may need to pull.