~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to tools/history2weaves.py

  • Committer: Martin Pool
  • Date: 2005-08-18 07:51:58 UTC
  • Revision ID: mbp@sourcefrog.net-20050818075157-5f69075fa843d558
- add space to store revision-id in weave files

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
"""Experiment in converting existing bzr branches to weaves."""
20
20
 
 
21
try:
 
22
    import psyco
 
23
    psyco.full()
 
24
except ImportError:
 
25
    pass
 
26
 
21
27
 
22
28
import bzrlib.branch
23
29
from bzrlib.revfile import Revfile
49
55
        
50
56
        inv_xml = b.get_inventory_xml(rev_id).readlines()
51
57
 
52
 
        new_idx = inv_weave.add(parents, inv_xml)
 
58
        new_idx = inv_weave.add(rev_id, parents, inv_xml)
53
59
        parents = [new_idx]
54
60
 
55
61
#         tree = b.revision_tree(rev_id)
81
87
 
82
88
        revno += 1
83
89
 
84
 
    inv_wf = AtomicFile('inventory.weave')
 
90
    inv_wf = AtomicFile('/tmp/inventory.weave')
85
91
    try:
86
92
        write_weave(inv_weave, inv_wf)
87
93
        inv_wf.commit()