/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 bzrlib/help_topics/en/hooks.txt

  • Committer: Martin Pool
  • Date: 2008-05-08 04:33:38 UTC
  • mfrom: (3414 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3415.
  • Revision ID: mbp@sourcefrog.net-20080508043338-ru3vflx8z641a76k
Merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Hooks
 
2
=====
 
3
 
 
4
post_push
 
5
---------
 
6
 
 
7
Run after ``push`` has completed.
 
8
 
 
9
The hook signature is (push_result), containing the members
 
10
 
 
11
  source_branch
 
12
    Where the data is being pushed from (read locked).
 
13
    This should be the lowest latency branch.
 
14
 
 
15
  target_branch
 
16
    The direct location where data is being sent (write locked).
 
17
 
 
18
  master_branch
 
19
    Either target_branch, or if the target is a bound branch, it
 
20
    will be the master location (write locked).
 
21
 
 
22
  local_branch
 
23
    If the target is a bound branch, this will be the target
 
24
    branch, else it will be None.
 
25
 
 
26
  old_revno
 
27
    The revision number (eg 10) of the branch before the push.
 
28
 
 
29
  old_revid
 
30
    The revision id (eg joe@foo.com-1234234-aoeua34) before the push.
 
31
 
 
32
  new_revno
 
33
    The revision number (eg 12) of the branch after the push.
 
34
 
 
35
  new_revid
 
36
    The revision id (eg joe@foo.com-5676566-boa234a) after the push.
 
37
 
 
38
post_pull
 
39
---------
 
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
 
 
53
Run prefore ``commit`` has completed.
 
54
 
 
55
The hook signature is (local, master, old_revno, old_revid, future_revno,
 
56
future_revid, tree_delta, future_tree) where old_revno is NULL_REVISION for
 
57
the first commit to a branch, tree_delta is a TreeDelta object describing
 
58
changes from the basis revision, and future_tree is an in-memory tree
 
59
obtained from CommitBuilder.revision_tree(). Hooks MUST NOT modify tree_delta
 
60
and future_tree.
 
61
 
 
62
post_commit
 
63
-----------
 
64
 
 
65
Run after ``commit`` has completed.
 
66
 
 
67
The hook signature is (local, master, old_revno, old_revid, new_revno,
 
68
new_revid) old_revid is NULL_REVISION for the first commit to a branch.
 
69
 
 
70
post_uncommit
 
71
-------------
 
72
 
 
73
Run after ``uncommit`` has completed.
 
74
 
 
75
The api signature is (local, master, old_revno, old_revid, new_revno,
 
76
new_revid) where local is the local branch or None, master is the target
 
77
branch, and an empty branch receives new_revno of 0, new_revid of None.
 
78
 
 
79
post_change_branch_tip
 
80
----------------------
 
81
 
 
82
Run after a branch tip has been changed but while the branch is still
 
83
write-locked. Note that push, pull, commit and uncommit all invoke this hook.
 
84
 
 
85
The hook signature is (params), where params is an object containing
 
86
the members
 
87
 
 
88
  branch
 
89
    The branch whose tip has been changed.
 
90
 
 
91
  old_revno
 
92
    The revision number (eg 10) of the branch before the change.
 
93
 
 
94
  old_revid
 
95
    The revision id (eg joe@foo.com-1234234-aoeua34) before the change.
 
96
 
 
97
  new_revno
 
98
    The revision number (eg 12) of the branch after the change.
 
99
 
 
100
  new_revid
 
101
    The revision id (eg joe@foo.com-5676566-boa234a) after the change.
 
102
 
 
103
The old_revno and new_revno members are integers, as the head
 
104
revision is never has a dotted revision number.
 
105
 
 
106
set_rh
 
107
------
 
108
 
 
109
Note: This hook is now deprecated and will be removed in the near future.
 
110
Please use the ``post_change_branch_tip`` hook instead.
 
111
 
 
112
See also `Using hooks`_ in the User Guide.
 
113
 
 
114
.. _Using hooks: ../user-guide/index.html#using-hooks