23
23
file_weave = wt.branch.repository.get_inventory_weave()
24
24
#file_weave = bt.get_weave(file_id)
25
25
#file_weave.enable_cache()
26
revisions = set(file_weave.versions())
27
ft_set = set(r for r in revisions if file_weave._index.get_method(r)
29
26
vf = MultiVersionedFile(25)
31
#for version_id in revisions:
32
# lines = [a + ' ' + l for a, l in file_weave.annotate_iter(version_id)]
33
# files[version_id] = lines
34
#files = dict(izip(ancestry, file_weave.get_line_list(ancestry)))
35
total = len(revisions)
36
while len(revisions) > 0:
38
for revision in revisions:
39
parents = file_weave.get_parents(revision)
40
if [p for p in parents if p not in vf._diffs] != []:
42
lines = file_weave.get_lines(revision)
43
# vf.add_version(lines, revision, parents,
44
# force_snapshot=(revision in ft_set))
45
vf.add_version(lines, revision, parents)
48
revisions = [r for r in revisions if r not in added]
49
print >> sys.stderr, "%.1f %%" % ((((total - len(revisions)) * 100.0)
27
ft_set = set(r for r in file_weave.versions() if
28
file_weave._index.get_method(r) == 'fulltext')
29
vf.import_versionedfile(file_weave)
51
30
print >> sys.stderr, file_weave
52
31
print >> sys.stderr, "%d fulltexts" % len(ft_set)
53
32
print >> sys.stderr, "%d snapshots" % len(vf._snapshots)