~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to mpregen

  • Committer: Aaron Bentley
  • Date: 2007-04-11 20:03:40 UTC
  • mto: (2520.4.1 bzr.mpbundle)
  • mto: This revision was merged to the branch mainline in revision 2631.
  • Revision ID: abentley@panoramicfeedback.com-20070411200340-81f58wipd7jpeoe7
Dynamically select snapshots based on all parents

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
file_id = wt.path2id(path)
23
23
file_weave = wt.branch.repository.get_inventory_weave()
24
24
#file_weave = bt.get_weave(file_id)
25
 
file_weave.enable_cache()
 
25
#file_weave.enable_cache()
26
26
revisions = set(file_weave.versions())
27
27
ft_set = set(r for r in revisions if file_weave._index.get_method(r)
28
28
             == 'fulltext')
29
 
vf = MultiVersionedFile(None)
 
29
vf = MultiVersionedFile(25)
30
30
#files = {}
31
31
#for version_id in revisions:
32
32
#    lines = [a + ' ' + l for a, l in file_weave.annotate_iter(version_id)]
40
40
        if [p for p in parents if p not in vf._diffs] != []:
41
41
            continue
42
42
        lines = file_weave.get_lines(revision)
43
 
        vf.add_version(lines, revision, parents,
44
 
                       force_snapshot=(revision in ft_set))
 
43
#        vf.add_version(lines, revision, parents,
 
44
#                       force_snapshot=(revision in ft_set))
 
45
        vf.add_version(lines, revision, parents)
45
46
        added.add(revision)
46
47
        vf.clear_cache()
47
48
    revisions = [r for r in revisions if r not in added]