~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commit.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-08-08 00:28:10 UTC
  • mfrom: (2617.6.9 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20070808002810-703n3mr6b6hwataj
(robertc) Introduce write_groups for repositories, allowing repositories with the physical ability to do transactional data insertion to have that modelled within bzr. (Robert Collins).

Show diffs side-by-side

added added

removed removed

Lines of Context:
296
296
                    entries_title="Directory")
297
297
            self.builder = self.branch.get_commit_builder(self.parents,
298
298
                self.config, timestamp, timezone, committer, revprops, rev_id)
299
 
            self._update_builder_with_changes()
300
 
            self._check_pointless()
301
 
 
302
 
            # TODO: Now the new inventory is known, check for conflicts.
303
 
            # ADHB 2006-08-08: If this is done, populate_new_inv should not add
304
 
            # weave lines, because nothing should be recorded until it is known
305
 
            # that commit will succeed.
306
 
            self._set_progress_stage("Saving data locally")
307
 
            self.builder.finish_inventory()
308
 
 
309
 
            # Prompt the user for a commit message if none provided
310
 
            message = message_callback(self)
311
 
            assert isinstance(message, unicode), type(message)
312
 
            self.message = message
313
 
            self._escape_commit_message()
314
 
 
315
 
            # Add revision data to the local branch
316
 
            self.rev_id = self.builder.commit(self.message)
317
 
            
 
299
            try:
 
300
                self._update_builder_with_changes()
 
301
                self._check_pointless()
 
302
 
 
303
                # TODO: Now the new inventory is known, check for conflicts.
 
304
                # ADHB 2006-08-08: If this is done, populate_new_inv should not add
 
305
                # weave lines, because nothing should be recorded until it is known
 
306
                # that commit will succeed.
 
307
                self._set_progress_stage("Saving data locally")
 
308
                self.builder.finish_inventory()
 
309
 
 
310
                # Prompt the user for a commit message if none provided
 
311
                message = message_callback(self)
 
312
                assert isinstance(message, unicode), type(message)
 
313
                self.message = message
 
314
                self._escape_commit_message()
 
315
 
 
316
                # Add revision data to the local branch
 
317
                self.rev_id = self.builder.commit(self.message)
 
318
            except:
 
319
                # perhaps this should be done by the CommitBuilder ?
 
320
                self.work_tree.branch.repository.abort_write_group()
 
321
                raise
 
322
 
318
323
            # Upload revision data to the master.
319
324
            # this will propagate merged revisions too if needed.
320
325
            if self.bound_branch: