2916
2916
RepositoryFormatPackDevelopment1,
2917
2917
RepositoryFormatPackDevelopment1Subtree,
2920
RepositoryFormatKnit1,
2921
RepositoryFormatKnitPack1,
2922
RepositoryFormatPackDevelopment1,
2923
RepositoryFormatKnitPack4,
2924
RepositoryFormatKnitPack5,
2925
RepositoryFormatKnitPack5RichRoot,
2928
RepositoryFormatKnit3,
2929
RepositoryFormatKnitPack3,
2930
RepositoryFormatPackDevelopment1Subtree,
2932
return (isinstance(source._format, nosubtrees) and
2933
isinstance(target._format, subtrees))
2920
RepositoryFormatKnit1, # no rr, no subtree
2921
RepositoryFormatKnitPack1, # no rr, no subtree
2922
RepositoryFormatPackDevelopment1, # no rr, no subtree
2923
RepositoryFormatKnitPack5, # no rr, no subtree
2926
RepositoryFormatKnit3, # rr, subtree
2927
RepositoryFormatKnitPack3, # rr, subtree
2928
RepositoryFormatKnitPack4, # rr, no subtree
2929
RepositoryFormatKnitPack5RichRoot,# rr, no subtree
2930
RepositoryFormatPackDevelopment1Subtree, # rr, subtree
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'
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'
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: