~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-06-28 07:08:27 UTC
  • mfrom: (2553.1.3 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20070628070827-h5s313dg5tnag9vj
(robertc) Show the names of commit hooks during commit.

Show diffs side-by-side

added added

removed removed

Lines of Context:
338
338
            rev_tree = self.builder.revision_tree()
339
339
            self.work_tree.set_parent_trees([(self.rev_id, rev_tree)])
340
340
            self.reporter.completed(new_revno, self.rev_id)
341
 
 
342
 
            # Process the post commit hooks, if any
343
 
            self._emit_progress_set_stage("Running post commit hooks")
344
341
            self._process_hooks(old_revno, new_revno)
345
342
        finally:
346
343
            self._cleanup()
469
466
 
470
467
    def _process_hooks(self, old_revno, new_revno):
471
468
        """Process any registered commit hooks."""
 
469
        # Process the post commit hooks, if any
 
470
        self._emit_progress_set_stage("Running post commit hooks")
472
471
        # old style commit hooks - should be deprecated ? (obsoleted in
473
472
        # 0.15)
474
473
        if self.config.post_commit() is not None:
494
493
        else:
495
494
            old_revid = bzrlib.revision.NULL_REVISION
496
495
        for hook in Branch.hooks['post_commit']:
 
496
            # show the running hook in the progress bar. As hooks may
 
497
            # end up doing nothing (e.g. because they are not configured by
 
498
            # the user) this is still showing progress, not showing overall
 
499
            # actions - its up to each plugin to show a UI if it want's to
 
500
            # (such as 'Emailing diff to foo@example.com').
 
501
            self.pb_stage_name = "Running post commit hooks [%s]" % \
 
502
                Branch.hooks.get_hook_name(hook)
 
503
            self._emit_progress()
497
504
            hook(hook_local, hook_master, old_revno, old_revid, new_revno,
498
505
                self.rev_id)
499
506