__init__.py
192 lines
| 5.8 KiB
| text/x-python
|
PythonLexer
r2105 | # Additional mappings that are not present in the pygments lexers | |||
# used for building stats | ||||
r2403 | # format is {'ext':['Names']} eg. {'py':['Python']} note: there can be | |||
# more than one name for extension | ||||
r2105 | # NOTE: that this will overide any mappings in LANGUAGES_EXTENSIONS_MAP | |||
# build by pygments | ||||
EXTRA_MAPPINGS = {} | ||||
r3375 | # additional lexer definitions for custom files | |||
# it's overrides pygments lexers, and uses defined name of lexer to colorize the | ||||
# files. Format is {'ext': 'lexer_name'} | ||||
# List of lexers can be printed running: | ||||
# python -c "import pprint;from pygments import lexers;pprint.pprint([(x[0], x[1]) for x in lexers.get_all_lexers()]);" | ||||
EXTRA_LEXERS = {} | ||||
r2105 | #============================================================================== | |||
# WHOOSH INDEX EXTENSIONS | ||||
#============================================================================== | ||||
# if INDEX_EXTENSIONS is [] it'll use pygments lexers extensions by default. | ||||
# To set your own just add to this list extensions to index with content | ||||
INDEX_EXTENSIONS = [] | ||||
# additional extensions for indexing besides the default from pygments | ||||
# those get's added to INDEX_EXTENSIONS | ||||
EXTRA_INDEX_EXTENSIONS = [] | ||||
#============================================================================== | ||||
# POST CREATE REPOSITORY HOOK | ||||
#============================================================================== | ||||
# this function will be executed after each repository is created | ||||
Jonathan Sternberg
|
r4016 | def _crrepohook(*args, **kwargs): | ||
r2105 | """ | |||
Post create repository HOOK | ||||
kwargs available: | ||||
:param repo_name: | ||||
:param repo_type: | ||||
:param description: | ||||
:param private: | ||||
:param created_on: | ||||
:param enable_downloads: | ||||
:param repo_id: | ||||
:param user_id: | ||||
:param enable_statistics: | ||||
:param clone_uri: | ||||
:param fork_id: | ||||
:param group_id: | ||||
:param created_by: | ||||
""" | ||||
return 0 | ||||
Jonathan Sternberg
|
r4016 | CREATE_REPO_HOOK = _crrepohook | ||
#============================================================================== | ||||
# POST CREATE USER HOOK | ||||
#============================================================================== | ||||
# this function will be executed after each user is created | ||||
def _cruserhook(*args, **kwargs): | ||||
""" | ||||
Post create user HOOK | ||||
kwargs available: | ||||
:param username: | ||||
:param full_name_or_username: | ||||
:param full_contact: | ||||
:param user_id: | ||||
:param name: | ||||
:param firstname: | ||||
:param short_contact: | ||||
:param admin: | ||||
:param lastname: | ||||
:param ip_addresses: | ||||
:param ldap_dn: | ||||
:param email: | ||||
:param api_key: | ||||
:param last_login: | ||||
:param full_name: | ||||
:param active: | ||||
:param password: | ||||
:param emails: | ||||
:param inherit_default_permissions: | ||||
Jonathan Sternberg
|
r4017 | :param created_by: | ||
Jonathan Sternberg
|
r4016 | """ | ||
return 0 | ||||
CREATE_USER_HOOK = _cruserhook | ||||
r2105 | ||||
#============================================================================== | ||||
r2904 | # POST DELETE REPOSITORY HOOK | |||
#============================================================================== | ||||
# this function will be executed after each repository deletion | ||||
Jonathan Sternberg
|
r4016 | def _dlrepohook(*args, **kwargs): | ||
r2904 | """ | |||
Jonathan Sternberg
|
r4016 | Post delete repository HOOK | ||
r2904 | kwargs available: | |||
:param repo_name: | ||||
:param repo_type: | ||||
:param description: | ||||
:param private: | ||||
:param created_on: | ||||
:param enable_downloads: | ||||
:param repo_id: | ||||
:param user_id: | ||||
:param enable_statistics: | ||||
:param clone_uri: | ||||
:param fork_id: | ||||
:param group_id: | ||||
:param deleted_by: | ||||
:param deleted_on: | ||||
""" | ||||
return 0 | ||||
Jonathan Sternberg
|
r4016 | DELETE_REPO_HOOK = _dlrepohook | ||
#============================================================================== | ||||
# POST DELETE USER HOOK | ||||
#============================================================================== | ||||
# this function will be executed after each user is deleted | ||||
def _dluserhook(*args, **kwargs): | ||||
""" | ||||
Post delete user HOOK | ||||
kwargs available: | ||||
:param username: | ||||
:param full_name_or_username: | ||||
:param full_contact: | ||||
:param user_id: | ||||
:param name: | ||||
:param firstname: | ||||
:param short_contact: | ||||
:param admin: | ||||
:param lastname: | ||||
:param ip_addresses: | ||||
:param ldap_dn: | ||||
:param email: | ||||
:param api_key: | ||||
:param last_login: | ||||
:param full_name: | ||||
:param active: | ||||
:param password: | ||||
:param emails: | ||||
:param inherit_default_permissions: | ||||
Jonathan Sternberg
|
r4017 | :param deleted_by: | ||
Jonathan Sternberg
|
r4016 | """ | ||
return 0 | ||||
DELETE_USER_HOOK = _dluserhook | ||||
r2904 | ||||
#============================================================================== | ||||
r2105 | # POST PUSH HOOK | |||
#============================================================================== | ||||
r2969 | # this function will be executed after each push it's executed after the | |||
# build-in hook that RhodeCode uses for logging pushes | ||||
r2105 | def _pushhook(*args, **kwargs): | |||
""" | ||||
Post push hook | ||||
kwargs available: | ||||
r2969 | :param server_url: url of instance that triggered this hook | |||
:param config: path to .ini config used | ||||
:param scm: type of VS 'git' or 'hg' | ||||
r2105 | :param username: name of user who pushed | |||
:param ip: ip of who pushed | ||||
r2969 | :param action: push | |||
r2105 | :param repository: repository name | |||
r2969 | :param pushed_revs: list of pushed revisions | |||
r2105 | """ | |||
return 0 | ||||
PUSH_HOOK = _pushhook | ||||
#============================================================================== | ||||
# POST PULL HOOK | ||||
#============================================================================== | ||||
r2969 | # this function will be executed after each push it's executed after the | |||
# build-in hook that RhodeCode uses for logging pulls | ||||
r2105 | def _pullhook(*args, **kwargs): | |||
""" | ||||
Post pull hook | ||||
kwargs available:: | ||||
r2969 | :param server_url: url of instance that triggered this hook | |||
:param config: path to .ini config used | ||||
:param scm: type of VS 'git' or 'hg' | ||||
r2105 | :param username: name of user who pulled | |||
r2969 | :param ip: ip of who pulled | |||
r2105 | :param action: pull | |||
:param repository: repository name | ||||
""" | ||||
return 0 | ||||
PULL_HOOK = _pullhook | ||||