~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: 2008-09-03 20:28:36 UTC
  • mfrom: (3684.1.1 jam-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20080903202836-qhw58bwsm1sixtfe
(jam) Merge 1.6.1rc2 back to trunk, including fixing bug #264321

Show diffs side-by-side

added added

removed removed

Lines of Context:
2916
2916
                RepositoryFormatPackDevelopment1,
2917
2917
                RepositoryFormatPackDevelopment1Subtree,
2918
2918
                )
2919
 
            nosubtrees = (
2920
 
                RepositoryFormatKnit1,
2921
 
                RepositoryFormatKnitPack1,
2922
 
                RepositoryFormatPackDevelopment1,
2923
 
                RepositoryFormatKnitPack4,
2924
 
                RepositoryFormatKnitPack5,
2925
 
                RepositoryFormatKnitPack5RichRoot,
2926
 
                )
2927
 
            subtrees = (
2928
 
                RepositoryFormatKnit3,
2929
 
                RepositoryFormatKnitPack3,
2930
 
                RepositoryFormatPackDevelopment1Subtree,
2931
 
                )
2932
 
            return (isinstance(source._format, nosubtrees) and
2933
 
                isinstance(target._format, subtrees))
 
2919
            norichroot = (
 
2920
                RepositoryFormatKnit1,            # no rr, no subtree
 
2921
                RepositoryFormatKnitPack1,        # no rr, no subtree
 
2922
                RepositoryFormatPackDevelopment1, # no rr, no subtree
 
2923
                RepositoryFormatKnitPack5,        # no rr, no subtree
 
2924
                )
 
2925
            richroot = (
 
2926
                RepositoryFormatKnit3,            # rr, subtree
 
2927
                RepositoryFormatKnitPack3,        # rr, subtree
 
2928
                RepositoryFormatKnitPack4,        # rr, no subtree
 
2929
                RepositoryFormatKnitPack5RichRoot,# rr, no subtree
 
2930
                RepositoryFormatPackDevelopment1Subtree, # rr, subtree
 
2931
                )
 
2932
            for format in norichroot:
 
2933
                if format.rich_root_data:
 
2934
                    raise AssertionError('Format %s is a rich-root format'
 
2935
                        ' but is included in the non-rich-root list'
 
2936
                        % (format,))
 
2937
            for format in richroot:
 
2938
                if not format.rich_root_data:
 
2939
                    raise AssertionError('Format %s is not a rich-root format'
 
2940
                        ' but is included in the rich-root list'
 
2941
                        % (format,))
 
2942
            # TODO: One alternative is to just check format.rich_root_data,
 
2943
            #       instead of keeping membership lists. However, the formats
 
2944
            #       *also* have to use the same 'Knit' style of storage
 
2945
            #       (line-deltas, fulltexts, etc.)
 
2946
            return (isinstance(source._format, norichroot) and
 
2947
                    isinstance(target._format, richroot))
2934
2948
        except AttributeError:
2935
2949
            return False
2936
2950