~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commit.py

Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
134
134
    def snapshot_change(self, change, path):
135
135
        if change == 'unchanged':
136
136
            return
 
137
        if change == 'added' and path == '':
 
138
            return
137
139
        note("%s %s", change, path)
138
140
 
139
141
    def completed(self, revno, rev_id):
308
310
                raise PointlessCommit()
309
311
 
310
312
            self._emit_progress_update()
311
 
            # TODO: Now the new inventory is known, check for conflicts and prompt the 
312
 
            # user for a commit message.
 
313
            # TODO: Now the new inventory is known, check for conflicts and
 
314
            # prompt the user for a commit message.
 
315
            # ADHB 2006-08-08: If this is done, populate_new_inv should not add
 
316
            # weave lines, because nothing should be recorded until it is known
 
317
            # that commit will succeed.
313
318
            self.builder.finish_inventory()
314
319
            self._emit_progress_update()
315
320
            self.rev_id = self.builder.commit(self.message)
503
508
        # ADHB 11-07-2006
504
509
        mutter("Selecting files for commit with filter %s", self.specific_files)
505
510
        entries = self.work_inv.iter_entries()
506
 
        # root requires special handling
507
 
        path, new_ie = entries.next()
508
 
        new_ie = new_ie.copy()
509
 
        new_ie.revision = None
510
 
        self.builder.record_entry_contents(new_ie, self.parent_invs, '', 
511
 
                                           self.work_tree)
512
 
        self._emit_progress_update()
 
511
        if not self.builder.record_root_entry:
 
512
            warnings.warn('CommitBuilders should support recording the root'
 
513
                ' entry as of bzr 0.10.', DeprecationWarning, stacklevel=1)
 
514
            self.builder.new_inventory.add(self.basis_inv.root.copy())
 
515
            entries.next()
 
516
            self._emit_progress_update()
513
517
        for path, new_ie in entries:
514
518
            self._emit_progress_update()
515
519
            file_id = new_ie.file_id