~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/help_topics/en/hooks.txt

  • Committer: John Arbash Meinel
  • Date: 2008-10-30 00:55:00 UTC
  • mto: (3815.2.5 prepare-1.9)
  • mto: This revision was merged to the branch mainline in revision 3811.
  • Revision ID: john@arbash-meinel.com-20081030005500-r5cej1cxflqhs3io
Switch so that we are using a simple timestamp as the first action.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
The class of each hook is given immediately after each hook type below.
16
16
 
17
17
 
 
18
open (Branch)
 
19
-------------
 
20
 
 
21
Called after a Branch object is opened, with the Branch object.
 
22
 
 
23
 
18
24
post_push (Branch)
19
25
------------------
20
26
 
105
111
branch, and an empty branch receives new_revno of 0, new_revid of None.
106
112
 
107
113
 
 
114
pre_change_branch_tip (Branch)
 
115
-------------------------------
 
116
 
 
117
Run before a branch tip has been changed, while the branch is write-locked.
 
118
Note that push, pull, commit and uncommit all invoke this hook.
 
119
 
 
120
The hook signature is (params), where params is an object containing
 
121
the members
 
122
 
 
123
  branch
 
124
    The branch whose tip has been changed.
 
125
 
 
126
  old_revno
 
127
    The revision number (eg 10) of the branch before the change.
 
128
 
 
129
  old_revid
 
130
    The revision id (eg joe@foo.com-1234234-aoeua34) before the change.
 
131
 
 
132
  new_revno
 
133
    The revision number (eg 12) of the branch after the change.
 
134
 
 
135
  new_revid
 
136
    The revision id (eg joe@foo.com-5676566-boa234a) after the change.
 
137
 
 
138
The old_revno and new_revno members are integers, as the head
 
139
revision never has a dotted revision number.
 
140
 
 
141
 
108
142
post_change_branch_tip (Branch)
109
143
-------------------------------
110
144
 
130
164
    The revision id (eg joe@foo.com-5676566-boa234a) after the change.
131
165
 
132
166
The old_revno and new_revno members are integers, as the head
133
 
revision is never has a dotted revision number.
 
167
revision never has a dotted revision number.
134
168
 
135
169
 
136
170
set_rh (Branch)
140
174
Please use the ``post_change_branch_tip`` hook instead.
141
175
 
142
176
 
 
177
transform_fallback_location (Branch)
 
178
------------------------------------
 
179
 
 
180
Invoked as a stacked branch activates its fallback locations.
 
181
 
 
182
The hook signature is (branch, url) where:
 
183
 
 
184
  branch
 
185
    The branch being opened.  Note that as it does not yet have its
 
186
    fallback locations activated, the branch should be treated as
 
187
    half-built.
 
188
 
 
189
  url
 
190
    The URL that the branch specified for its fallback location.
 
191
 
 
192
The hook must return a URL for the branch containing the fallback
 
193
location. If multiple hooks are registered, the order in which they 
 
194
will be called is undefined and subject to change.
 
195
 
 
196
(New in 1.9)
 
197
 
 
198
 
143
199
server_started (SmartTCPServer)
144
200
-------------------------------
145
201
 
158
214
 
159
215
Invoked whenever the server stops serving a directory.
160
216
The hook signature is the same as ``server_started``.
 
217
 
 
218
 
 
219
lock_acquired (LockDir)
 
220
----------------------------
 
221
 
 
222
Called with a LockResult object when a lock has been successfully acquired.
 
223
(New in 1.8.)
 
224
 
 
225
lock_released (LockDir)
 
226
----------------------------
 
227
 
 
228
Called with a LockResult object when a lock has been successfully released.
 
229
(New in 1.8.)