~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repository.py

  • Committer: John Arbash Meinel
  • Date: 2009-03-11 07:42:37 UTC
  • mto: (3735.2.143 brisbane-core)
  • mto: This revision was merged to the branch mainline in revision 4280.
  • Revision ID: john@arbash-meinel.com-20090311074237-6lzsbd3r0tmbofjz
Continue trying to reduce the friction for the groupcompress repo formats.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3120
3120
        Do not support CHK based repositories at this point.
3121
3121
        """
3122
3122
        from bzrlib.repofmt.pack_repo import RepositoryFormatPack
 
3123
        from bzrlib.repofmt.groupcompress_repo import (
 
3124
            RepositoryFormatPackGCPlain,
 
3125
            )
3123
3126
        try:
3124
3127
            are_packs = (isinstance(source._format, RepositoryFormatPack) and
3125
3128
                isinstance(target._format, RepositoryFormatPack))
3126
3129
        except AttributeError:
3127
3130
            return False
3128
 
        return (are_packs and InterRepository._same_model(source, target) and
 
3131
        if not are_packs:
 
3132
            return False
 
3133
        if (isinstance(source._format, RepositoryFormatPackGCPlain)
 
3134
            or isinstance(target._format, RepositoryFormatPackGCPlain)):
 
3135
            return False
 
3136
        return (InterRepository._same_model(source, target) and
3129
3137
            not source._format.supports_chks)
3130
3138
 
3131
3139
    @needs_write_lock