Mercurial > kallithea
annotate rhodecode/lib/hooks.py @ 1972:27abf546aa8a beta
#348 added post-create repository hook
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Tue, 31 Jan 2012 04:41:00 +0200 |
parents | 89efedac4e6c |
children | 87f0800abc7b |
rev | line source |
---|---|
913
d173938d711b
filled in some docs for hooks
Marcin Kuzminski <marcin@python-works.com>
parents:
902
diff
changeset
|
1 # -*- coding: utf-8 -*- |
d173938d711b
filled in some docs for hooks
Marcin Kuzminski <marcin@python-works.com>
parents:
902
diff
changeset
|
2 """ |
d173938d711b
filled in some docs for hooks
Marcin Kuzminski <marcin@python-works.com>
parents:
902
diff
changeset
|
3 rhodecode.lib.hooks |
d173938d711b
filled in some docs for hooks
Marcin Kuzminski <marcin@python-works.com>
parents:
902
diff
changeset
|
4 ~~~~~~~~~~~~~~~~~~~ |
d173938d711b
filled in some docs for hooks
Marcin Kuzminski <marcin@python-works.com>
parents:
902
diff
changeset
|
5 |
d173938d711b
filled in some docs for hooks
Marcin Kuzminski <marcin@python-works.com>
parents:
902
diff
changeset
|
6 Hooks runned by rhodecode |
1203
6832ef664673
source code cleanup: remove trailing white space, normalize file endings
Marcin Kuzminski <marcin@python-works.com>
parents:
1114
diff
changeset
|
7 |
913
d173938d711b
filled in some docs for hooks
Marcin Kuzminski <marcin@python-works.com>
parents:
902
diff
changeset
|
8 :created_on: Aug 6, 2010 |
d173938d711b
filled in some docs for hooks
Marcin Kuzminski <marcin@python-works.com>
parents:
902
diff
changeset
|
9 :author: marcink |
1824
89efedac4e6c
2012 copyrights
Marcin Kuzminski <marcin@python-works.com>
parents:
1814
diff
changeset
|
10 :copyright: (C) 2010-2012 Marcin Kuzminski <marcin@python-works.com> |
913
d173938d711b
filled in some docs for hooks
Marcin Kuzminski <marcin@python-works.com>
parents:
902
diff
changeset
|
11 :license: GPLv3, see COPYING for more details. |
d173938d711b
filled in some docs for hooks
Marcin Kuzminski <marcin@python-works.com>
parents:
902
diff
changeset
|
12 """ |
1206
a671db5bdd58
fixed license issue #149
Marcin Kuzminski <marcin@python-works.com>
parents:
1203
diff
changeset
|
13 # This program is free software: you can redistribute it and/or modify |
a671db5bdd58
fixed license issue #149
Marcin Kuzminski <marcin@python-works.com>
parents:
1203
diff
changeset
|
14 # it under the terms of the GNU General Public License as published by |
a671db5bdd58
fixed license issue #149
Marcin Kuzminski <marcin@python-works.com>
parents:
1203
diff
changeset
|
15 # the Free Software Foundation, either version 3 of the License, or |
a671db5bdd58
fixed license issue #149
Marcin Kuzminski <marcin@python-works.com>
parents:
1203
diff
changeset
|
16 # (at your option) any later version. |
1203
6832ef664673
source code cleanup: remove trailing white space, normalize file endings
Marcin Kuzminski <marcin@python-works.com>
parents:
1114
diff
changeset
|
17 # |
392
b27d32cb3157
Implemented hooks system,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
18 # This program is distributed in the hope that it will be useful, |
b27d32cb3157
Implemented hooks system,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
19 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
b27d32cb3157
Implemented hooks system,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
b27d32cb3157
Implemented hooks system,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
21 # GNU General Public License for more details. |
1203
6832ef664673
source code cleanup: remove trailing white space, normalize file endings
Marcin Kuzminski <marcin@python-works.com>
parents:
1114
diff
changeset
|
22 # |
392
b27d32cb3157
Implemented hooks system,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
23 # You should have received a copy of the GNU General Public License |
1206
a671db5bdd58
fixed license issue #149
Marcin Kuzminski <marcin@python-works.com>
parents:
1203
diff
changeset
|
24 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
913
d173938d711b
filled in some docs for hooks
Marcin Kuzminski <marcin@python-works.com>
parents:
902
diff
changeset
|
25 import os |
d173938d711b
filled in some docs for hooks
Marcin Kuzminski <marcin@python-works.com>
parents:
902
diff
changeset
|
26 import sys |
392
b27d32cb3157
Implemented hooks system,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
27 |
1415
677408ee9355
fixed hooks for mercurial 1.9
Marcin Kuzminski <marcin@python-works.com>
parents:
1307
diff
changeset
|
28 from mercurial.scmutil import revrange |
654
7f5976da192c
#48 rewrite action loggers into hooks with all changesets that are inside a push
Marcin Kuzminski <marcin@python-works.com>
parents:
629
diff
changeset
|
29 from mercurial.node import nullrev |
913
d173938d711b
filled in some docs for hooks
Marcin Kuzminski <marcin@python-works.com>
parents:
902
diff
changeset
|
30 |
654
7f5976da192c
#48 rewrite action loggers into hooks with all changesets that are inside a push
Marcin Kuzminski <marcin@python-works.com>
parents:
629
diff
changeset
|
31 from rhodecode.lib import helpers as h |
7f5976da192c
#48 rewrite action loggers into hooks with all changesets that are inside a push
Marcin Kuzminski <marcin@python-works.com>
parents:
629
diff
changeset
|
32 from rhodecode.lib.utils import action_logger |
392
b27d32cb3157
Implemented hooks system,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
33 |
1307 | 34 |
392
b27d32cb3157
Implemented hooks system,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
35 def repo_size(ui, repo, hooktype=None, **kwargs): |
1722
e7eef7a1db6a
#235 forking page repo group selection
Marcin Kuzminski <marcin@python-works.com>
parents:
1416
diff
changeset
|
36 """ |
e7eef7a1db6a
#235 forking page repo group selection
Marcin Kuzminski <marcin@python-works.com>
parents:
1416
diff
changeset
|
37 Presents size of repository after push |
1203
6832ef664673
source code cleanup: remove trailing white space, normalize file endings
Marcin Kuzminski <marcin@python-works.com>
parents:
1114
diff
changeset
|
38 |
913
d173938d711b
filled in some docs for hooks
Marcin Kuzminski <marcin@python-works.com>
parents:
902
diff
changeset
|
39 :param ui: |
d173938d711b
filled in some docs for hooks
Marcin Kuzminski <marcin@python-works.com>
parents:
902
diff
changeset
|
40 :param repo: |
d173938d711b
filled in some docs for hooks
Marcin Kuzminski <marcin@python-works.com>
parents:
902
diff
changeset
|
41 :param hooktype: |
d173938d711b
filled in some docs for hooks
Marcin Kuzminski <marcin@python-works.com>
parents:
902
diff
changeset
|
42 """ |
392
b27d32cb3157
Implemented hooks system,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
43 |
b27d32cb3157
Implemented hooks system,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
44 size_hg, size_root = 0, 0 |
b27d32cb3157
Implemented hooks system,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
45 for path, dirs, files in os.walk(repo.root): |
b27d32cb3157
Implemented hooks system,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
46 if path.find('.hg') != -1: |
b27d32cb3157
Implemented hooks system,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
47 for f in files: |
675
59670f091c76
bugfix, repo_size crashed when broken symlinks where inside a repository.
Marcin Kuzminski <marcin@python-works.com>
parents:
654
diff
changeset
|
48 try: |
59670f091c76
bugfix, repo_size crashed when broken symlinks where inside a repository.
Marcin Kuzminski <marcin@python-works.com>
parents:
654
diff
changeset
|
49 size_hg += os.path.getsize(os.path.join(path, f)) |
59670f091c76
bugfix, repo_size crashed when broken symlinks where inside a repository.
Marcin Kuzminski <marcin@python-works.com>
parents:
654
diff
changeset
|
50 except OSError: |
59670f091c76
bugfix, repo_size crashed when broken symlinks where inside a repository.
Marcin Kuzminski <marcin@python-works.com>
parents:
654
diff
changeset
|
51 pass |
392
b27d32cb3157
Implemented hooks system,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
52 else: |
b27d32cb3157
Implemented hooks system,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
53 for f in files: |
675
59670f091c76
bugfix, repo_size crashed when broken symlinks where inside a repository.
Marcin Kuzminski <marcin@python-works.com>
parents:
654
diff
changeset
|
54 try: |
59670f091c76
bugfix, repo_size crashed when broken symlinks where inside a repository.
Marcin Kuzminski <marcin@python-works.com>
parents:
654
diff
changeset
|
55 size_root += os.path.getsize(os.path.join(path, f)) |
59670f091c76
bugfix, repo_size crashed when broken symlinks where inside a repository.
Marcin Kuzminski <marcin@python-works.com>
parents:
654
diff
changeset
|
56 except OSError: |
59670f091c76
bugfix, repo_size crashed when broken symlinks where inside a repository.
Marcin Kuzminski <marcin@python-works.com>
parents:
654
diff
changeset
|
57 pass |
59670f091c76
bugfix, repo_size crashed when broken symlinks where inside a repository.
Marcin Kuzminski <marcin@python-works.com>
parents:
654
diff
changeset
|
58 |
392
b27d32cb3157
Implemented hooks system,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
59 size_hg_f = h.format_byte_size(size_hg) |
b27d32cb3157
Implemented hooks system,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
60 size_root_f = h.format_byte_size(size_root) |
503
3d6d548ad3cc
Added user action mapper to map push to changeset.
Marcin Kuzminski <marcin@python-works.com>
parents:
392
diff
changeset
|
61 size_total_f = h.format_byte_size(size_root + size_hg) |
1814
9de452afbe01
small change for post update hook that displays repository size
Marcin Kuzminski <marcin@python-works.com>
parents:
1722
diff
changeset
|
62 |
9de452afbe01
small change for post update hook that displays repository size
Marcin Kuzminski <marcin@python-works.com>
parents:
1722
diff
changeset
|
63 last_cs = repo[len(repo) - 1] |
9de452afbe01
small change for post update hook that displays repository size
Marcin Kuzminski <marcin@python-works.com>
parents:
1722
diff
changeset
|
64 |
9de452afbe01
small change for post update hook that displays repository size
Marcin Kuzminski <marcin@python-works.com>
parents:
1722
diff
changeset
|
65 msg = ('Repository size .hg:%s repo:%s total:%s\n' |
9de452afbe01
small change for post update hook that displays repository size
Marcin Kuzminski <marcin@python-works.com>
parents:
1722
diff
changeset
|
66 'Last revision is now r%s:%s\n') % ( |
9de452afbe01
small change for post update hook that displays repository size
Marcin Kuzminski <marcin@python-works.com>
parents:
1722
diff
changeset
|
67 size_hg_f, size_root_f, size_total_f, last_cs.rev(), last_cs.hex()[:12] |
9de452afbe01
small change for post update hook that displays repository size
Marcin Kuzminski <marcin@python-works.com>
parents:
1722
diff
changeset
|
68 ) |
9de452afbe01
small change for post update hook that displays repository size
Marcin Kuzminski <marcin@python-works.com>
parents:
1722
diff
changeset
|
69 |
9de452afbe01
small change for post update hook that displays repository size
Marcin Kuzminski <marcin@python-works.com>
parents:
1722
diff
changeset
|
70 sys.stdout.write(msg) |
675
59670f091c76
bugfix, repo_size crashed when broken symlinks where inside a repository.
Marcin Kuzminski <marcin@python-works.com>
parents:
654
diff
changeset
|
71 |
1307 | 72 |
654
7f5976da192c
#48 rewrite action loggers into hooks with all changesets that are inside a push
Marcin Kuzminski <marcin@python-works.com>
parents:
629
diff
changeset
|
73 def log_pull_action(ui, repo, **kwargs): |
1722
e7eef7a1db6a
#235 forking page repo group selection
Marcin Kuzminski <marcin@python-works.com>
parents:
1416
diff
changeset
|
74 """ |
e7eef7a1db6a
#235 forking page repo group selection
Marcin Kuzminski <marcin@python-works.com>
parents:
1416
diff
changeset
|
75 Logs user last pull action |
1203
6832ef664673
source code cleanup: remove trailing white space, normalize file endings
Marcin Kuzminski <marcin@python-works.com>
parents:
1114
diff
changeset
|
76 |
654
7f5976da192c
#48 rewrite action loggers into hooks with all changesets that are inside a push
Marcin Kuzminski <marcin@python-works.com>
parents:
629
diff
changeset
|
77 :param ui: |
7f5976da192c
#48 rewrite action loggers into hooks with all changesets that are inside a push
Marcin Kuzminski <marcin@python-works.com>
parents:
629
diff
changeset
|
78 :param repo: |
7f5976da192c
#48 rewrite action loggers into hooks with all changesets that are inside a push
Marcin Kuzminski <marcin@python-works.com>
parents:
629
diff
changeset
|
79 """ |
675
59670f091c76
bugfix, repo_size crashed when broken symlinks where inside a repository.
Marcin Kuzminski <marcin@python-works.com>
parents:
654
diff
changeset
|
80 |
654
7f5976da192c
#48 rewrite action loggers into hooks with all changesets that are inside a push
Marcin Kuzminski <marcin@python-works.com>
parents:
629
diff
changeset
|
81 extra_params = dict(repo.ui.configitems('rhodecode_extras')) |
7f5976da192c
#48 rewrite action loggers into hooks with all changesets that are inside a push
Marcin Kuzminski <marcin@python-works.com>
parents:
629
diff
changeset
|
82 username = extra_params['username'] |
7f5976da192c
#48 rewrite action loggers into hooks with all changesets that are inside a push
Marcin Kuzminski <marcin@python-works.com>
parents:
629
diff
changeset
|
83 repository = extra_params['repository'] |
7f5976da192c
#48 rewrite action loggers into hooks with all changesets that are inside a push
Marcin Kuzminski <marcin@python-works.com>
parents:
629
diff
changeset
|
84 action = 'pull' |
675
59670f091c76
bugfix, repo_size crashed when broken symlinks where inside a repository.
Marcin Kuzminski <marcin@python-works.com>
parents:
654
diff
changeset
|
85 |
1722
e7eef7a1db6a
#235 forking page repo group selection
Marcin Kuzminski <marcin@python-works.com>
parents:
1416
diff
changeset
|
86 action_logger(username, action, repository, extra_params['ip'], |
e7eef7a1db6a
#235 forking page repo group selection
Marcin Kuzminski <marcin@python-works.com>
parents:
1416
diff
changeset
|
87 commit=True) |
675
59670f091c76
bugfix, repo_size crashed when broken symlinks where inside a repository.
Marcin Kuzminski <marcin@python-works.com>
parents:
654
diff
changeset
|
88 |
654
7f5976da192c
#48 rewrite action loggers into hooks with all changesets that are inside a push
Marcin Kuzminski <marcin@python-works.com>
parents:
629
diff
changeset
|
89 return 0 |
503
3d6d548ad3cc
Added user action mapper to map push to changeset.
Marcin Kuzminski <marcin@python-works.com>
parents:
392
diff
changeset
|
90 |
1307 | 91 |
654
7f5976da192c
#48 rewrite action loggers into hooks with all changesets that are inside a push
Marcin Kuzminski <marcin@python-works.com>
parents:
629
diff
changeset
|
92 def log_push_action(ui, repo, **kwargs): |
1722
e7eef7a1db6a
#235 forking page repo group selection
Marcin Kuzminski <marcin@python-works.com>
parents:
1416
diff
changeset
|
93 """ |
e7eef7a1db6a
#235 forking page repo group selection
Marcin Kuzminski <marcin@python-works.com>
parents:
1416
diff
changeset
|
94 Maps user last push action to new changeset id, from mercurial |
1203
6832ef664673
source code cleanup: remove trailing white space, normalize file endings
Marcin Kuzminski <marcin@python-works.com>
parents:
1114
diff
changeset
|
95 |
604
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
96 :param ui: |
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
97 :param repo: |
503
3d6d548ad3cc
Added user action mapper to map push to changeset.
Marcin Kuzminski <marcin@python-works.com>
parents:
392
diff
changeset
|
98 """ |
675
59670f091c76
bugfix, repo_size crashed when broken symlinks where inside a repository.
Marcin Kuzminski <marcin@python-works.com>
parents:
654
diff
changeset
|
99 |
654
7f5976da192c
#48 rewrite action loggers into hooks with all changesets that are inside a push
Marcin Kuzminski <marcin@python-works.com>
parents:
629
diff
changeset
|
100 extra_params = dict(repo.ui.configitems('rhodecode_extras')) |
7f5976da192c
#48 rewrite action loggers into hooks with all changesets that are inside a push
Marcin Kuzminski <marcin@python-works.com>
parents:
629
diff
changeset
|
101 username = extra_params['username'] |
7f5976da192c
#48 rewrite action loggers into hooks with all changesets that are inside a push
Marcin Kuzminski <marcin@python-works.com>
parents:
629
diff
changeset
|
102 repository = extra_params['repository'] |
1114
4de3fa6290a7
#109, added manual pull of changes for repositories that have remote location filled in.
Marcin Kuzminski <marcin@python-works.com>
parents:
913
diff
changeset
|
103 action = extra_params['action'] + ':%s' |
654
7f5976da192c
#48 rewrite action loggers into hooks with all changesets that are inside a push
Marcin Kuzminski <marcin@python-works.com>
parents:
629
diff
changeset
|
104 node = kwargs['node'] |
675
59670f091c76
bugfix, repo_size crashed when broken symlinks where inside a repository.
Marcin Kuzminski <marcin@python-works.com>
parents:
654
diff
changeset
|
105 |
654
7f5976da192c
#48 rewrite action loggers into hooks with all changesets that are inside a push
Marcin Kuzminski <marcin@python-works.com>
parents:
629
diff
changeset
|
106 def get_revs(repo, rev_opt): |
7f5976da192c
#48 rewrite action loggers into hooks with all changesets that are inside a push
Marcin Kuzminski <marcin@python-works.com>
parents:
629
diff
changeset
|
107 if rev_opt: |
7f5976da192c
#48 rewrite action loggers into hooks with all changesets that are inside a push
Marcin Kuzminski <marcin@python-works.com>
parents:
629
diff
changeset
|
108 revs = revrange(repo, rev_opt) |
675
59670f091c76
bugfix, repo_size crashed when broken symlinks where inside a repository.
Marcin Kuzminski <marcin@python-works.com>
parents:
654
diff
changeset
|
109 |
654
7f5976da192c
#48 rewrite action loggers into hooks with all changesets that are inside a push
Marcin Kuzminski <marcin@python-works.com>
parents:
629
diff
changeset
|
110 if len(revs) == 0: |
7f5976da192c
#48 rewrite action loggers into hooks with all changesets that are inside a push
Marcin Kuzminski <marcin@python-works.com>
parents:
629
diff
changeset
|
111 return (nullrev, nullrev) |
7f5976da192c
#48 rewrite action loggers into hooks with all changesets that are inside a push
Marcin Kuzminski <marcin@python-works.com>
parents:
629
diff
changeset
|
112 return (max(revs), min(revs)) |
7f5976da192c
#48 rewrite action loggers into hooks with all changesets that are inside a push
Marcin Kuzminski <marcin@python-works.com>
parents:
629
diff
changeset
|
113 else: |
7f5976da192c
#48 rewrite action loggers into hooks with all changesets that are inside a push
Marcin Kuzminski <marcin@python-works.com>
parents:
629
diff
changeset
|
114 return (len(repo) - 1, 0) |
675
59670f091c76
bugfix, repo_size crashed when broken symlinks where inside a repository.
Marcin Kuzminski <marcin@python-works.com>
parents:
654
diff
changeset
|
115 |
654
7f5976da192c
#48 rewrite action loggers into hooks with all changesets that are inside a push
Marcin Kuzminski <marcin@python-works.com>
parents:
629
diff
changeset
|
116 stop, start = get_revs(repo, [node + ':']) |
675
59670f091c76
bugfix, repo_size crashed when broken symlinks where inside a repository.
Marcin Kuzminski <marcin@python-works.com>
parents:
654
diff
changeset
|
117 |
654
7f5976da192c
#48 rewrite action loggers into hooks with all changesets that are inside a push
Marcin Kuzminski <marcin@python-works.com>
parents:
629
diff
changeset
|
118 revs = (str(repo[r]) for r in xrange(start, stop + 1)) |
675
59670f091c76
bugfix, repo_size crashed when broken symlinks where inside a repository.
Marcin Kuzminski <marcin@python-works.com>
parents:
654
diff
changeset
|
119 |
654
7f5976da192c
#48 rewrite action loggers into hooks with all changesets that are inside a push
Marcin Kuzminski <marcin@python-works.com>
parents:
629
diff
changeset
|
120 action = action % ','.join(revs) |
675
59670f091c76
bugfix, repo_size crashed when broken symlinks where inside a repository.
Marcin Kuzminski <marcin@python-works.com>
parents:
654
diff
changeset
|
121 |
1722
e7eef7a1db6a
#235 forking page repo group selection
Marcin Kuzminski <marcin@python-works.com>
parents:
1416
diff
changeset
|
122 action_logger(username, action, repository, extra_params['ip'], |
e7eef7a1db6a
#235 forking page repo group selection
Marcin Kuzminski <marcin@python-works.com>
parents:
1416
diff
changeset
|
123 commit=True) |
675
59670f091c76
bugfix, repo_size crashed when broken symlinks where inside a repository.
Marcin Kuzminski <marcin@python-works.com>
parents:
654
diff
changeset
|
124 |
654
7f5976da192c
#48 rewrite action loggers into hooks with all changesets that are inside a push
Marcin Kuzminski <marcin@python-works.com>
parents:
629
diff
changeset
|
125 return 0 |
1972
27abf546aa8a
#348 added post-create repository hook
Marcin Kuzminski <marcin@python-works.com>
parents:
1824
diff
changeset
|
126 |
27abf546aa8a
#348 added post-create repository hook
Marcin Kuzminski <marcin@python-works.com>
parents:
1824
diff
changeset
|
127 |
27abf546aa8a
#348 added post-create repository hook
Marcin Kuzminski <marcin@python-works.com>
parents:
1824
diff
changeset
|
128 def log_create_repository(repository_dict, created_by, **kwargs): |
27abf546aa8a
#348 added post-create repository hook
Marcin Kuzminski <marcin@python-works.com>
parents:
1824
diff
changeset
|
129 """ |
27abf546aa8a
#348 added post-create repository hook
Marcin Kuzminski <marcin@python-works.com>
parents:
1824
diff
changeset
|
130 Post create repository Hook. This is a dummy function for admins to re-use |
27abf546aa8a
#348 added post-create repository hook
Marcin Kuzminski <marcin@python-works.com>
parents:
1824
diff
changeset
|
131 if needed |
27abf546aa8a
#348 added post-create repository hook
Marcin Kuzminski <marcin@python-works.com>
parents:
1824
diff
changeset
|
132 |
27abf546aa8a
#348 added post-create repository hook
Marcin Kuzminski <marcin@python-works.com>
parents:
1824
diff
changeset
|
133 :param repository: dict dump of repository object |
27abf546aa8a
#348 added post-create repository hook
Marcin Kuzminski <marcin@python-works.com>
parents:
1824
diff
changeset
|
134 :param created_by: username who created repository |
27abf546aa8a
#348 added post-create repository hook
Marcin Kuzminski <marcin@python-works.com>
parents:
1824
diff
changeset
|
135 :param created_date: date of creation |
27abf546aa8a
#348 added post-create repository hook
Marcin Kuzminski <marcin@python-works.com>
parents:
1824
diff
changeset
|
136 |
27abf546aa8a
#348 added post-create repository hook
Marcin Kuzminski <marcin@python-works.com>
parents:
1824
diff
changeset
|
137 available keys of repository_dict: |
27abf546aa8a
#348 added post-create repository hook
Marcin Kuzminski <marcin@python-works.com>
parents:
1824
diff
changeset
|
138 |
27abf546aa8a
#348 added post-create repository hook
Marcin Kuzminski <marcin@python-works.com>
parents:
1824
diff
changeset
|
139 'repo_type', |
27abf546aa8a
#348 added post-create repository hook
Marcin Kuzminski <marcin@python-works.com>
parents:
1824
diff
changeset
|
140 'description', |
27abf546aa8a
#348 added post-create repository hook
Marcin Kuzminski <marcin@python-works.com>
parents:
1824
diff
changeset
|
141 'private', |
27abf546aa8a
#348 added post-create repository hook
Marcin Kuzminski <marcin@python-works.com>
parents:
1824
diff
changeset
|
142 'created_on', |
27abf546aa8a
#348 added post-create repository hook
Marcin Kuzminski <marcin@python-works.com>
parents:
1824
diff
changeset
|
143 'enable_downloads', |
27abf546aa8a
#348 added post-create repository hook
Marcin Kuzminski <marcin@python-works.com>
parents:
1824
diff
changeset
|
144 'repo_id', |
27abf546aa8a
#348 added post-create repository hook
Marcin Kuzminski <marcin@python-works.com>
parents:
1824
diff
changeset
|
145 'user_id', |
27abf546aa8a
#348 added post-create repository hook
Marcin Kuzminski <marcin@python-works.com>
parents:
1824
diff
changeset
|
146 'enable_statistics', |
27abf546aa8a
#348 added post-create repository hook
Marcin Kuzminski <marcin@python-works.com>
parents:
1824
diff
changeset
|
147 'clone_uri', |
27abf546aa8a
#348 added post-create repository hook
Marcin Kuzminski <marcin@python-works.com>
parents:
1824
diff
changeset
|
148 'fork_id', |
27abf546aa8a
#348 added post-create repository hook
Marcin Kuzminski <marcin@python-works.com>
parents:
1824
diff
changeset
|
149 'group_id', |
27abf546aa8a
#348 added post-create repository hook
Marcin Kuzminski <marcin@python-works.com>
parents:
1824
diff
changeset
|
150 'repo_name' |
27abf546aa8a
#348 added post-create repository hook
Marcin Kuzminski <marcin@python-works.com>
parents:
1824
diff
changeset
|
151 |
27abf546aa8a
#348 added post-create repository hook
Marcin Kuzminski <marcin@python-works.com>
parents:
1824
diff
changeset
|
152 """ |
27abf546aa8a
#348 added post-create repository hook
Marcin Kuzminski <marcin@python-works.com>
parents:
1824
diff
changeset
|
153 |
27abf546aa8a
#348 added post-create repository hook
Marcin Kuzminski <marcin@python-works.com>
parents:
1824
diff
changeset
|
154 |
27abf546aa8a
#348 added post-create repository hook
Marcin Kuzminski <marcin@python-works.com>
parents:
1824
diff
changeset
|
155 return 0 |