/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/commit.py

  • Committer: Daniel Watkins
  • Date: 2007-09-04 23:14:00 UTC
  • mto: This revision was merged to the branch mainline in revision 2796.
  • Revision ID: d.m.watkins@warwick.ac.uk-20070904231400-132tr6dhaqty9gzt
Added 'started' hook to CommitReporters and moved location functionality from completed hook into it.

Show diffs side-by-side

added added

removed removed

Lines of Context:
86
86
class NullCommitReporter(object):
87
87
    """I report on progress of a commit."""
88
88
 
 
89
    def started(self, revno, revid, location=None):
 
90
        pass
 
91
 
89
92
    def snapshot_change(self, change, path):
90
93
        pass
91
94
 
121
124
            return
122
125
        self._note("%s %s", change, path)
123
126
 
124
 
    def completed(self, revno, rev_id, location=None):
 
127
    def started(self, revno, rev_id, location=None):
125
128
        if location is not None:
126
129
            location = ' to "' + location + '"'
127
130
        else:
128
131
            location = ''
129
 
        self._note('Committed revision %d%s.', revno, location)
 
132
        self._note('Committing revision %d%s.', revno, location)
 
133
 
 
134
    def completed(self, revno, rev_id):
 
135
        self._note('Committed revision %d.', revno)
130
136
    
131
137
    def deleted(self, file_id):
132
138
        self._note('deleted %s', file_id)
324
330
                self.work_tree.branch.repository.abort_write_group()
325
331
                raise
326
332
 
327
 
            master_location = None
328
 
 
329
333
            # Upload revision data to the master.
330
334
            # this will propagate merged revisions too if needed.
331
335
            if self.bound_branch:
337
341
                # local branch to be out of date
338
342
                self.master_branch.set_last_revision_info(new_revno,
339
343
                                                          self.rev_id)
340
 
                master_location = self.branch.get_bound_location()
341
344
 
342
345
            # and now do the commit locally.
343
346
            self.branch.set_last_revision_info(new_revno, self.rev_id)
346
349
            self._set_progress_stage("Updating the working tree")
347
350
            rev_tree = self.builder.revision_tree()
348
351
            self.work_tree.set_parent_trees([(self.rev_id, rev_tree)])
349
 
            self.reporter.completed(new_revno, self.rev_id, master_location)
 
352
            self.reporter.completed(new_revno, self.rev_id)
350
353
            self._process_hooks(old_revno, new_revno)
351
354
        finally:
352
355
            self._cleanup()