Rev 2577: (robertc) Allow -Dhooks to get the hooks invoked during commit logged. in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Tue Jul 3 09:36:51 BST 2007


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 2577
revision-id: pqm at pqm.ubuntu.com-20070703083649-cbfyk0jt0itbktgb
parent: pqm at pqm.ubuntu.com-20070703080840-vjh1sot1a5nwix4h
parent: robertc at robertcollins.net-20070703074630-6c5jph1rtpcjbw46
committer: Canonical.com Patch Queue Manager<pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Tue 2007-07-03 09:36:49 +0100
message:
  (robertc) Allow -Dhooks to get the hooks invoked during commit logged.
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/commit.py               commit.py-20050511101309-79ec1a0168e0e825
  bzrlib/debug.py                debug.py-20061102062349-vdhrw9qdpck8cl35-1
    ------------------------------------------------------------
    revno: 2553.2.16
    merged: robertc at robertcollins.net-20070703074630-6c5jph1rtpcjbw46
    parent: robertc at robertcollins.net-20070703072155-vodf62irxoa7nthy
    parent: pqm at pqm.ubuntu.com-20070703073546-9dv8bocak8u3ou6m
    committer: Robert Collins <robertc at robertcollins.net>
    branch nick: integration
    timestamp: Tue 2007-07-03 17:46:30 +1000
    message:
      Merge bzr.dev again to resolve NEWS conflicts.
    ------------------------------------------------------------
    revno: 2553.2.15
    merged: robertc at robertcollins.net-20070703072155-vodf62irxoa7nthy
    parent: robertc at robertcollins.net-20070702061147-rmouxo51qwz7rkns
    parent: robertc at robertcollins.net-20070628082944-g033tsq16abxue3h
    committer: Robert Collins <robertc at robertcollins.net>
    branch nick: integration
    timestamp: Tue 2007-07-03 17:21:55 +1000
    message:
      Merge bzr.dev.
    ------------------------------------------------------------
    revno: 2560.1.4
    merged: robertc at robertcollins.net-20070628082944-g033tsq16abxue3h
    parent: robertc at robertcollins.net-20070628080025-nc7i3aax1hz39dkw
    committer: Robert Collins <robertc at robertcollins.net>
    branch nick: commit-hook-names
    timestamp: Thu 2007-06-28 18:29:44 +1000
    message:
      Allow -Dhooks to get the hooks invoked during commit logged.
=== modified file 'NEWS'
--- a/NEWS	2007-07-03 07:37:11 +0000
+++ b/NEWS	2007-07-03 08:36:49 +0000
@@ -60,9 +60,12 @@
       library users and plugins. See the ``bzrlib.api`` module for details.
       (Robert Collins)
 
-    * ``bzrtracefilename --version`` now shows the location of the bzr log file, which
+    * ``bzr --version`` now shows the location of the bzr log file, which
       is especially useful on Windows.  (Martin Pool)
 
+    * -D now supports hooks to get debug tracing of hooks (though its currently
+      minimal in nature). (Robert Collins)
+
     * Long log format reports deltas on merge revisions. 
       (John Arbash Meinel, Kent Gibson)
 

=== modified file 'bzrlib/commit.py'
--- a/bzrlib/commit.py	2007-06-28 06:32:03 +0000
+++ b/bzrlib/commit.py	2007-06-28 08:29:44 +0000
@@ -57,6 +57,7 @@
 from cStringIO import StringIO
 
 from bzrlib import (
+    debug,
     errors,
     inventory,
     tree,
@@ -501,6 +502,8 @@
             self.pb_stage_name = "Running post commit hooks [%s]" % \
                 Branch.hooks.get_hook_name(hook)
             self._emit_progress()
+            if 'hooks' in debug.debug_flags:
+                mutter("Invoking commit hook: %r", hook)
             hook(hook_local, hook_master, old_revno, old_revid, new_revno,
                 self.rev_id)
 

=== modified file 'bzrlib/debug.py'
--- a/bzrlib/debug.py	2006-11-02 06:25:59 +0000
+++ b/bzrlib/debug.py	2007-06-28 08:29:44 +0000
@@ -18,3 +18,4 @@
 debug_flags = set()
 """Set of flags that enable different debug behaviour"""
 
+# hooks - debug activity about hooks.




More information about the bazaar-commits mailing list