~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commit.py

  • Committer: Robert Collins
  • Date: 2005-10-20 02:52:44 UTC
  • Revision ID: robertc@robertcollins.net-20051020025244-fa1017d19a0ef618
post commit hook, first pass implementation

Show diffs side-by-side

added added

removed removed

Lines of Context:
264
264
 
265
265
            self._record_inventory()
266
266
            self._make_revision()
267
 
            self.reporter.completed(self.branch.revno()+1, self.rev_id)
268
267
            self.branch.append_revision(self.rev_id)
269
268
            self.branch.set_pending_merges([])
 
269
            self.reporter.completed(self.branch.revno()+1, self.rev_id)
 
270
            if self.config.post_commit() is not None:
 
271
                hooks = self.config.post_commit().split(' ')
 
272
                # this would be nicer with twisted.python.reflect.namedAny
 
273
                for hook in hooks:
 
274
                    result = eval(hook + '(branch, rev_id)',
 
275
                                  {'branch':self.branch,
 
276
                                   'bzrlib':bzrlib,
 
277
                                   'rev_id':self.rev_id})
270
278
        finally:
271
279
            self.branch.unlock()
272
280