~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repository.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-04-12 00:33:51 UTC
  • mfrom: (2305.2.4 supports-rich-root)
  • Revision ID: pqm@pqm.ubuntu.com-20070412003351-vvhci6f1lvpelk24
(Andrew Bennetts) Use repo.supports_rich_root() rather than repo._format.rich_root_data

Show diffs side-by-side

added added

removed removed

Lines of Context:
1341
1341
 
1342
1342
    @staticmethod
1343
1343
    def is_compatible(source, target):
1344
 
        if not isinstance(source, Repository):
1345
 
            return False
1346
 
        if not isinstance(target, Repository):
1347
 
            return False
1348
 
        if source._format.rich_root_data != target._format.rich_root_data:
 
1344
        if source.supports_rich_root() != target.supports_rich_root():
1349
1345
            return False
1350
1346
        if source._serializer != target._serializer:
1351
1347
            return False
1352
 
        else:
1353
 
            return True 
 
1348
        return True
1354
1349
 
1355
1350
    @needs_write_lock
1356
1351
    def copy_content(self, revision_id=None):
1586
1581
 
1587
1582
    @staticmethod
1588
1583
    def is_compatible(source, target):
1589
 
        if not isinstance(source, Repository):
1590
 
            return False
1591
 
        if not isinstance(target, Repository):
1592
 
            return False
1593
 
        if not source._format.rich_root_data and target._format.rich_root_data:
 
1584
        if not source.supports_rich_root() and target.supports_rich_root():
1594
1585
            return True
1595
1586
        else:
1596
1587
            return False