~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commit.py

  • Committer: Martin Pool
  • Date: 2005-08-29 04:53:09 UTC
  • Revision ID: mbp@sourcefrog.net-20050829045309-6609704fdb44b600
- fix up logging for history2weaves tool

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
 
18
18
 
 
19
# FIXME: "bzr commit doc/format" commits doc/format.txt!
 
20
 
19
21
def commit(branch, message,
20
22
           timestamp=None,
21
23
           timezone=None,
64
66
    from bzrlib.errors import BzrError, PointlessCommit
65
67
    from bzrlib.revision import Revision, RevisionReference
66
68
    from bzrlib.trace import mutter, note
67
 
    from bzrlib.xml import serializer_v4
 
69
    from bzrlib.xml import pack_xml
68
70
 
69
71
    branch.lock_write()
70
72
 
121
123
        inv_id = rev_id
122
124
 
123
125
        inv_tmp = tempfile.TemporaryFile()
124
 
        
125
 
        serializer_v4.write_inventory(new_inv, inv_tmp)
 
126
        pack_xml(new_inv, inv_tmp)
126
127
        inv_tmp.seek(0)
127
128
        branch.inventory_store.add(inv_tmp, inv_id)
128
129
        mutter('new inventory_id is {%s}' % inv_id)
161
162
            rev.parents.append(RevisionReference(merge_rev))            
162
163
 
163
164
        rev_tmp = tempfile.TemporaryFile()
164
 
        serializer_v4.write_revision(rev, rev_tmp)
 
165
        pack_xml(rev, rev_tmp)
165
166
        rev_tmp.seek(0)
166
167
        branch.revision_store.add(rev_tmp, rev_id)
167
168
        mutter("new revision_id is {%s}" % rev_id)