/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 doc/en/user-reference/hooks.txt

  • Committer: Ian Clatworthy
  • Date: 2007-12-14 03:20:15 UTC
  • mto: (3147.1.1 ianc-integration)
  • mto: This revision was merged to the branch mainline in revision 3148.
  • Revision ID: ian.clatworthy@internode.on.net-20071214032015-m2bz4qyxnt44mser
include feedback from kiko

Show diffs side-by-side

added added

removed removed

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