##// END OF EJS Templates
extensions: adapt hooks to latest version of extensions (pre-push)
marcink -
r1456:c0280798 default
parent child Browse files
Show More
@@ -93,6 +93,7 b' def pre_push(extras):'
93 93
94 94 It bans pushing when the repository is locked.
95 95 """
96
96 97 usr = User.get_by_username(extras.username)
97 98 output = ''
98 99 if extras.locked_by[0] and usr.user_id != int(extras.locked_by[0]):
@@ -287,7 +288,7 b' pre_push_extension = ExtensionCallback('
287 288 hook_name='PRE_PUSH_HOOK',
288 289 kwargs_keys=(
289 290 'server_url', 'config', 'scm', 'username', 'ip', 'action',
290 'repository', 'repo_store_path'))
291 'repository', 'repo_store_path', 'commit_ids'))
291 292
292 293
293 294 post_push_extension = ExtensionCallback(
@@ -69,7 +69,7 b' def load_extension(filename, async=False'
69 69 # used for building stats
70 70 # format is {'ext':['Names']} eg. {'py':['Python']} note: there can be
71 71 # more than one name for extension
72 # NOTE: that this will overide any mappings in LANGUAGES_EXTENSIONS_MAP
72 # NOTE: that this will override any mappings in LANGUAGES_EXTENSIONS_MAP
73 73 # build by pygments
74 74 EXTRA_MAPPINGS = {}
75 75
@@ -348,7 +348,7 b' def _prepushhook(*args, **kwargs):'
348 348
349 349 expected_parameters = (
350 350 'server_url', 'config', 'scm', 'username', 'ip', 'action',
351 'repository', 'repo_store_path')
351 'repository', 'repo_store_path', 'commit_ids')
352 352 _verify_kwargs(expected_parameters, kwargs)
353 353
354 354 return 0
@@ -516,5 +516,5 b' def _verify_kwargs(expected_parameters, '
516 516 missing_kwargs = expected_parameters - kwargs_keys
517 517 unexpected_kwargs = kwargs_keys - expected_parameters
518 518 raise AssertionError(
519 "Missing parameters: %r, unexpected parameters: %s" %
519 "rcextensions: Missing parameters: %r, unexpected parameters: %s" %
520 520 (missing_kwargs, unexpected_kwargs))
General Comments 0
You need to be logged in to leave comments. Login now