~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commit.py

  • Committer: Aaron Bentley
  • Date: 2005-09-12 13:48:32 UTC
  • mfrom: (1185.3.4)
  • mto: (1185.1.16)
  • mto: This revision was merged to the branch mainline in revision 1390.
  • Revision ID: abentley@panoramicfeedback.com-20050912134832-c23db11dc63170b6
Merged from mpool

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
 
 
21
19
def commit(branch, message,
22
20
           timestamp=None,
23
21
           timezone=None,
66
64
    from bzrlib.errors import BzrError, PointlessCommit
67
65
    from bzrlib.revision import Revision, RevisionReference
68
66
    from bzrlib.trace import mutter, note
69
 
    from bzrlib.xml import pack_xml
 
67
    from bzrlib.xml import serializer_v4
70
68
 
71
69
    branch.lock_write()
72
70
 
123
121
        inv_id = rev_id
124
122
 
125
123
        inv_tmp = tempfile.TemporaryFile()
126
 
        pack_xml(new_inv, inv_tmp)
 
124
        
 
125
        serializer_v4.write_inventory(new_inv, inv_tmp)
127
126
        inv_tmp.seek(0)
128
127
        branch.inventory_store.add(inv_tmp, inv_id)
129
128
        mutter('new inventory_id is {%s}' % inv_id)
162
161
            rev.parents.append(RevisionReference(merge_rev))            
163
162
 
164
163
        rev_tmp = tempfile.TemporaryFile()
165
 
        pack_xml(rev, rev_tmp)
 
164
        serializer_v4.write_revision(rev, rev_tmp)
166
165
        rev_tmp.seek(0)
167
166
        branch.revision_store.add(rev_tmp, rev_id)
168
167
        mutter("new revision_id is {%s}" % rev_id)