##// END OF EJS Templates
hooks: fix case for SSH hooks executed in certain condition with errors....
marcink -
r334:5e1182e3 stable
parent child Browse files
Show More
@@ -140,7 +140,9 b' def _extras_from_ui(ui):'
140 if env_hook_data:
140 if env_hook_data:
141 hook_data = env_hook_data
141 hook_data = env_hook_data
142
142
143 extras = json.loads(hook_data)
143 extras = {}
144 if hook_data:
145 extras = json.loads(hook_data)
144 return extras
146 return extras
145
147
146
148
@@ -167,7 +169,8 b' def pre_pull(ui, repo, **kwargs):'
167
169
168
170
169 def pre_pull_ssh(ui, repo, **kwargs):
171 def pre_pull_ssh(ui, repo, **kwargs):
170 if _extras_from_ui(ui).get('SSH'):
172 extras = _extras_from_ui(ui)
173 if extras and extras.get('SSH'):
171 return pre_pull(ui, repo, **kwargs)
174 return pre_pull(ui, repo, **kwargs)
172 return 0
175 return 0
173
176
@@ -178,7 +181,8 b' def post_pull(ui, repo, **kwargs):'
178
181
179
182
180 def post_pull_ssh(ui, repo, **kwargs):
183 def post_pull_ssh(ui, repo, **kwargs):
181 if _extras_from_ui(ui).get('SSH'):
184 extras = _extras_from_ui(ui)
185 if extras and extras.get('SSH'):
182 return post_pull(ui, repo, **kwargs)
186 return post_pull(ui, repo, **kwargs)
183 return 0
187 return 0
184
188
General Comments 0
You need to be logged in to leave comments. Login now