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

  • Committer: John Arbash Meinel
  • Date: 2009-02-18 20:39:05 UTC
  • mfrom: (0.21.3 dev5)
  • mto: (0.22.4 experimental)
  • mto: This revision was merged to the branch mainline in revision 4280.
  • Revision ID: john@arbash-meinel.com-20090218203905-8npi7rmtgt1lup4h
Merge in the dev5 formats.

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
try:
50
50
    from bzrlib.repofmt.pack_repo import (
51
51
    CHKInventoryRepository,
52
 
    RepositoryFormatPackDevelopment4,
53
 
    RepositoryFormatPackDevelopment4Subtree,
 
52
    RepositoryFormatPackDevelopment5,
 
53
    RepositoryFormatPackDevelopment5Hash16,
 
54
    RepositoryFormatPackDevelopment5Hash255,
54
55
    )
55
56
    chk_support = True
56
57
except ImportError:
411
412
            ", interoperates with pack-0.92-subtrees\n")
412
413
 
413
414
if chk_support:
414
 
    'Bazaar development format - 1.9+gc (needs bzr.dev from 1.9)\n',
415
 
    class RepositoryFormatPackGCPlainCHK(RepositoryFormatPackDevelopment4):
 
415
    class RepositoryFormatPackGCPlainCHK(RepositoryFormatPackDevelopment5):
416
416
        """A CHK+group compress pack repository."""
417
417
 
418
418
        repository_class = GCCHKPackRepository
419
419
 
420
420
        def get_format_string(self):
421
421
            """See RepositoryFormat.get_format_string()."""
422
 
            return ('Bazaar development format - chk+gc '
423
 
                '(needs bzr.dev from 1.12)\n')
424
 
 
425
 
        def get_format_description(self):
426
 
            """See RepositoryFormat.get_format_description()."""
427
 
            return ("Development repository format - chk+groupcompress "
428
 
                ", interoperates with pack-0.92\n")
 
422
            return ('Bazaar development format - chk+gc'
 
423
                    ' (needs bzr.dev from 1.13)\n')
 
424
 
 
425
        def get_format_description(self):
 
426
            """See RepositoryFormat.get_format_description()."""
 
427
            return ("Development repository format - chk+groupcompress")
 
428
 
 
429
 
 
430
    class RepositoryFormatPackGCPlainCHK16(RepositoryFormatPackDevelopment5Hash16):
 
431
        """A hashed CHK+group compress pack repository."""
 
432
 
 
433
        repository_class = GCCHKPackRepository
 
434
 
 
435
        def get_format_string(self):
 
436
            """See RepositoryFormat.get_format_string()."""
 
437
            return ('Bazaar development format - hash16chk+gc'
 
438
                    ' (needs bzr.dev from 1.13)\n')
 
439
 
 
440
        def get_format_description(self):
 
441
            """See RepositoryFormat.get_format_description()."""
 
442
            return ("Development repository format - hash16chk+groupcompress")
 
443
 
 
444
 
 
445
    class RepositoryFormatPackGCPlainCHK255(RepositoryFormatPackDevelopment5Hash255):
 
446
        """A hashed CHK+group compress pack repository."""
 
447
 
 
448
        repository_class = GCCHKPackRepository
 
449
 
 
450
        def get_format_string(self):
 
451
            """See RepositoryFormat.get_format_string()."""
 
452
            return ('Bazaar development format - hash255chk+gc'
 
453
                    ' (needs bzr.dev from 1.13)\n')
 
454
 
 
455
        def get_format_description(self):
 
456
            """See RepositoryFormat.get_format_description()."""
 
457
            return ("Development repository format - hash255chk+groupcompress")
429
458
 
430
459
 
431
460
def pack_incompatible(source, target, orig_method=InterPackRepo.is_compatible):
433
462
    formats = (RepositoryFormatPackGCPlain, RepositoryFormatPackGCRichRoot,
434
463
        RepositoryFormatPackGCSubtrees)
435
464
    if chk_support:
436
 
        formats = formats + (RepositoryFormatPackGCPlainCHK,)
 
465
        formats = formats + (RepositoryFormatPackGCPlainCHK,
 
466
                             RepositoryFormatPackGCPlainCHK16,
 
467
                             RepositoryFormatPackGCPlainCHK255)
437
468
    if isinstance(source._format, formats) or isinstance(target._format, formats):
438
469
        return False
439
470
    else: