~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commit.py

import scotts non verbose commit fix to allow non pointless commits

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