~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commit.py

  • Committer: Martin Pool
  • Date: 2005-08-26 02:31:37 UTC
  • Revision ID: mbp@sourcefrog.net-20050826023137-eb4b101cc92f9792
- ignore tags files

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)
248
249
        if not work_tree.has_id(file_id):
249
250
            if verbose:
250
251
                print('deleted %s%s' % (path, kind_marker(entry.kind)))
251
 
            any_changes = True
 
252
                any_changes = True
252
253
            mutter("    file is missing, removing from inventory")
253
254
            missing_ids.append(file_id)
254
255
            continue
310
311
            else:
311
312
                print 'renamed', marked
312
313
                any_changes = True
313
 
        elif old_ie != entry:
314
 
            any_changes = True
315
 
 
 
314
                        
316
315
    return missing_ids, inv, any_changes
317
316
 
318
317