@@ -131,7 +131,9 @@ All the hooks!
131
131
> echo " class loghook(basehook):" >> $ hpath
132
132
> echo " def check(self, log, revdata):" >> $ hpath
133
133
> echo " with open('$ serverpath /res','a') as k:" >> $ hpath
134
- > echo " k.write('$ side : $ hook % s\\\n ' % sorted(vars(revdata) ))" >> $ hpath
134
+ > echo " avalaiablevars = vars(revdata)" >> $ hpath
135
+ > echo " del avalaiablevars['_revs']" >> $ hpath
136
+ > echo " k.write('$ side : $ hook % s\\\n ' % sorted(avalaiablevars) )" >> $ hpath
135
137
> echo " return True" >> $ hpath
136
138
> echo " runhooks('$ hook ', hooks=[loghook])" >> $ hpath
137
139
> chmod + x $ hpath
@@ -155,20 +157,20 @@ All the hooks!
155
157
$ echo " op: after push" >> $ serverpath / res
156
158
$ cat $ serverpath / res
157
159
op: before first commit
158
- client: pre-commit [' _revs ' , ' reporoot' ]
159
- client: prepare-commit-msg [' _revs ' , ' messagefile' , ' mode' , ' reporoot' , ' sha' ]
160
- client: commit-msg [' _revs ' , ' messagefile' , ' reporoot' ]
161
- client: post-commit [' _revs ' , ' reporoot' ]
160
+ client: pre-commit [' reporoot' ]
161
+ client: prepare-commit-msg [' messagefile' , ' mode' , ' reporoot' , ' sha' ]
162
+ client: commit-msg [' messagefile' , ' reporoot' ]
163
+ client: post-commit [' reporoot' ]
162
164
op: after first commit
163
165
op: before second commit
164
- client: pre-commit [' _revs ' , ' reporoot' ]
165
- client: prepare-commit-msg [' _revs ' , ' messagefile' , ' mode' , ' reporoot' , ' sha' ]
166
+ client: pre-commit [' reporoot' ]
167
+ client: prepare-commit-msg [' messagefile' , ' mode' , ' reporoot' , ' sha' ]
166
168
op: after second commit
167
169
op: before push
168
- client: pre-push [' _revs ' , ' reporoot' , ' revstobepushed' ]
169
- server: pre-receive [' _revs ' , ' receivedrevs' , ' reporoot' ]
170
- server: update [' _revs ' , ' new' , ' old' , ' refname' , ' reporoot' ]
171
- server: post-receive [' _revs ' , ' receivedrevs' , ' reporoot' ]
172
- server: post-update [' _revs ' , ' reporoot' ]
170
+ client: pre-push [' reporoot' , ' revstobepushed' ]
171
+ server: pre-receive [' receivedrevs' , ' reporoot' ]
172
+ server: update [' new' , ' old' , ' refname' , ' reporoot' ]
173
+ server: post-receive [' receivedrevs' , ' reporoot' ]
174
+ server: post-update [' reporoot' ]
173
175
op: after push
174
176
0 commit comments