1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
Hooks
=====
post_push
---------
Run after ``push`` has completed.
The hook signature is (push_result), containing the members
source_branch
Where the data is being pushed from (read locked).
This should be the lowest latency branch.
target_branch
The direct location where data is being sent (write locked).
master_branch
Either target_branch, or if the target is a bound branch, it
will be the master location (write locked).
local_branch
If the target is a bound branch, this will be the target
branch, else it will be None.
old_revno
The revision number (eg 10) of the branch before the push.
old_revid
The revision id (eg joe@foo.com-1234234-aoeua34) before the push.
new_revno
The revision number (eg 12) of the branch after the push.
new_revid
The revision id (eg joe@foo.com-5676566-boa234a) after the push.
post_pull
---------
Run after ``pull`` has completed.
The hook signature is (push_result) containing the members
(source, local, master, old_revno, old_revid, new_revno, new_revid)
where local is the local target branch or None, master is the target
master branch, and the rest should be self explanatory. The source
is read-locked and the target branches are write-locked. Source will
be the local low-latency branch.
pre_commit
----------
Run prefore ``commit`` has completed.
The hook signature is (local, master, old_revno, old_revid, future_revno,
future_revid, tree_delta, future_tree) where old_revno is NULL_REVISION for
the first commit to a branch, tree_delta is a TreeDelta object describing
changes from the basis revision, and future_tree is an in-memory tree
obtained from CommitBuilder.revision_tree(). Hooks MUST NOT modify tree_delta
and future_tree.
post_commit
-----------
Run after ``commit`` has completed.
The hook signature is (local, master, old_revno, old_revid, new_revno,
new_revid) old_revid is NULL_REVISION for the first commit to a branch.
post_uncommit
-------------
Run after ``uncommit`` has completed.
The api signature is (local, master, old_revno, old_revid, new_revno,
new_revid) where local is the local branch or None, master is the target
branch, and an empty branch receives new_revno of 0, new_revid of None.
set_rh
------
Run after the branch's revision history has been modified (push, pull, commit
and uncommit can all modify the revision history).
The hook signature is (branch, revision_history), and the branch will be
write-locked.
See also `Using hooks`_ in the User Guide.
.. _Using hooks: ../user-guide/index.html#using-hooks
|