##// END OF EJS Templates
filled in some docs for hooks
marcink -
r913:d173938d beta
parent child Browse files
Show More
@@ -1,8 +1,15 b''
1 #!/usr/bin/env python
1 # -*- coding: utf-8 -*-
2 # encoding: utf-8
2 """
3 # custom hooks for application
3 rhodecode.lib.hooks
4 # Copyright (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>
4 ~~~~~~~~~~~~~~~~~~~
5 #
5
6 Hooks runned by rhodecode
7
8 :created_on: Aug 6, 2010
9 :author: marcink
10 :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>
11 :license: GPLv3, see COPYING for more details.
12 """
6 # This program is free software; you can redistribute it and/or
13 # This program is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU General Public License
14 # modify it under the terms of the GNU General Public License
8 # as published by the Free Software Foundation; version 2
15 # as published by the Free Software Foundation; version 2
@@ -17,19 +24,23 b''
17 # along with this program; if not, write to the Free Software
24 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
25 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 # MA 02110-1301, USA.
26 # MA 02110-1301, USA.
20 """
27 import os
21 Created on Aug 6, 2010
28 import sys
29 import getpass
22
30
23 @author: marcink
24 """
25 from mercurial.cmdutil import revrange
31 from mercurial.cmdutil import revrange
26 from mercurial.node import nullrev
32 from mercurial.node import nullrev
33
27 from rhodecode.lib import helpers as h
34 from rhodecode.lib import helpers as h
28 from rhodecode.lib.utils import action_logger
35 from rhodecode.lib.utils import action_logger
29 import os
30 import sys
31
36
32 def repo_size(ui, repo, hooktype=None, **kwargs):
37 def repo_size(ui, repo, hooktype=None, **kwargs):
38 """Presents size of repository after push
39
40 :param ui:
41 :param repo:
42 :param hooktype:
43 """
33
44
34 if hooktype != 'changegroup':
45 if hooktype != 'changegroup':
35 return False
46 return False
@@ -55,8 +66,8 b' def repo_size(ui, repo, hooktype=None, *'
55 % (size_hg_f, size_root_f, size_total_f))
66 % (size_hg_f, size_root_f, size_total_f))
56
67
57 def log_pull_action(ui, repo, **kwargs):
68 def log_pull_action(ui, repo, **kwargs):
58 """
69 """Logs user last pull action
59 Logs user last pull action
70
60 :param ui:
71 :param ui:
61 :param repo:
72 :param repo:
62 """
73 """
@@ -71,8 +82,8 b' def log_pull_action(ui, repo, **kwargs):'
71 return 0
82 return 0
72
83
73 def log_push_action(ui, repo, **kwargs):
84 def log_push_action(ui, repo, **kwargs):
74 """
85 """Maps user last push action to new changeset id, from mercurial
75 Maps user last push action to new changeset id, from mercurial
86
76 :param ui:
87 :param ui:
77 :param repo:
88 :param repo:
78 """
89 """
General Comments 0
You need to be logged in to leave comments. Login now