~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repofmt/knitrepo.py

  • Committer: Martin Pool
  • Date: 2009-08-26 05:38:16 UTC
  • mfrom: (4634.6.2 2.0)
  • mto: (4634.6.4 2.0)
  • mto: This revision was merged to the branch mainline in revision 4660.
  • Revision ID: mbp@sourcefrog.net-20090826053816-ht6jpktdm77vi6t5
MergeĀ 2.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
424
424
        """See RepositoryFormat.get_format_description()."""
425
425
        return "Knit repository format 1"
426
426
 
427
 
    def check_conversion_target(self, target_format):
428
 
        pass
429
 
 
430
427
 
431
428
class RepositoryFormatKnit3(RepositoryFormatKnit):
432
429
    """Bzr repository knit format 3.
460
457
 
461
458
    _matchingbzrdir = property(_get_matching_bzrdir, _ignore_setting_bzrdir)
462
459
 
463
 
    def check_conversion_target(self, target_format):
464
 
        if not target_format.rich_root_data:
465
 
            raise errors.BadConversionTarget(
466
 
                'Does not support rich root data.', target_format)
467
 
        if not getattr(target_format, 'supports_tree_reference', False):
468
 
            raise errors.BadConversionTarget(
469
 
                'Does not support nested trees', target_format)
470
 
 
471
460
    def get_format_string(self):
472
461
        """See RepositoryFormat.get_format_string()."""
473
462
        return "Bazaar Knit Repository Format 3 (bzr 0.15)\n"
509
498
 
510
499
    _matchingbzrdir = property(_get_matching_bzrdir, _ignore_setting_bzrdir)
511
500
 
512
 
    def check_conversion_target(self, target_format):
513
 
        if not target_format.rich_root_data:
514
 
            raise errors.BadConversionTarget(
515
 
                'Does not support rich root data.', target_format)
516
 
 
517
501
    def get_format_string(self):
518
502
        """See RepositoryFormat.get_format_string()."""
519
503
        return 'Bazaar Knit Repository Format 4 (bzr 1.0)\n'