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