Show More
@@ -4,12 +4,14 b' Welcome to RhodeCode (RhodiumCode) docum' | |||
|
4 | 4 | ================================================= |
|
5 | 5 | |
|
6 | 6 | ``RhodeCode`` (formerly hg-app) is Pylons framework based Mercurial repository |
|
7 | browser/management with build in push/pull server and full text search. | |
|
8 |
It works on http/https, has build in permission/authentication |
|
|
9 | It's similar to github or bitbucket, but it's suppose to run as standalone | |
|
10 | hosted application, it's open source and focuses more on restricted access to | |
|
11 | repositories. It's powered by vcs_ library that me and Lukasz Balcerzak created | |
|
12 | to handle many various version control systems. | |
|
7 | browser/management tool with build in push/pull server and full text search. | |
|
8 | It works on http/https, has build in permission/authentication system with | |
|
9 | ability to auth via LDAP. It's similar in some parts to github or bitbucket, | |
|
10 | but it's suppose to run as standalone hosted application, it's open source | |
|
11 | and donation ware and focuses more on providing customized, self administered | |
|
12 | interface for Mercurial(and soon GIT) repositories. It's powered by vcs_ | |
|
13 | library that me and Lukasz Balcerzak created to handle many various version | |
|
14 | control systems. | |
|
13 | 15 | |
|
14 | 16 | RhodeCode uses `Semantic Versioning <http://semver.org/>`_ |
|
15 | 17 | |
@@ -45,7 +47,7 b' Features' | |||
|
45 | 47 | - Has it's own middleware to handle mercurial_ protocol request. |
|
46 | 48 | Each request can be logged and authenticated. Runs on threads unlikely to |
|
47 | 49 | hgweb. You can make multiple pulls/pushes simultaneous. Supports http/https |
|
48 |
and |
|
|
50 | and LDAP | |
|
49 | 51 | - Full permissions (private/read/write/admin) and authentication per project. |
|
50 | 52 | One account for web interface and mercurial_ push/pull/clone operations. |
|
51 | 53 | - Mako templates let's you customize look and feel of application. |
@@ -60,7 +62,7 b' Features' | |||
|
60 | 62 | (no external search servers required all in one application) |
|
61 | 63 | - Setup project descriptions and info inside built in db for easy, non |
|
62 | 64 | file-system operations |
|
63 | - Inteligent cache with invalidation after push or project change, provides high | |
|
65 | - Intelligent cache with invalidation after push or project change, provides high | |
|
64 | 66 | performance and always up to date data. |
|
65 | 67 | - Rss / atom feeds, gravatar support, download sources as zip/tar/gz |
|
66 | 68 | - Async tasks for speed and performance using celery_ (works without them too) |
@@ -77,20 +79,20 b' Incoming / Plans' | |||
|
77 | 79 | |
|
78 | 80 | - project grouping |
|
79 | 81 | - User groups/teams |
|
82 | - ssh based authentication with server side key management | |
|
80 | 83 | - code review (probably based on hg-review) |
|
81 | 84 | - full git_ support, with push/pull server (currently in beta tests) |
|
82 | 85 | - redmine integration |
|
83 | 86 | - public accessible activity feeds |
|
84 | 87 | - commit based build in wiki system |
|
85 |
- clone points and cloning from remote repositories into |
|
|
86 | (git_ and mercurial_) | |
|
88 | - clone points and cloning from remote repositories into RhodeCode | |
|
87 | 89 | - more statistics and graph (global annotation + some more statistics) |
|
88 | 90 | - other cools stuff that i can figure out (or You can help me figure out) |
|
89 | 91 | |
|
90 | 92 | License |
|
91 | 93 | ------- |
|
92 | 94 | |
|
93 |
`` |
|
|
95 | ``RhodeCode`` is released under GPL_ license. | |
|
94 | 96 | |
|
95 | 97 | |
|
96 | 98 | Mailing group Q&A |
@@ -112,3 +114,13 b' Online documentation' | |||
|
112 | 114 | |
|
113 | 115 | make html |
|
114 | 116 | |
|
117 | .. _virtualenv: http://pypi.python.org/pypi/virtualenv | |
|
118 | .. _python: http://www.python.org/ | |
|
119 | .. _django: http://www.djangoproject.com/ | |
|
120 | .. _mercurial: http://mercurial.selenic.com/ | |
|
121 | .. _subversion: http://subversion.tigris.org/ | |
|
122 | .. _git: http://git-scm.com/ | |
|
123 | .. _celery: http://celeryproject.org/ | |
|
124 | .. _Sphinx: http://sphinx.pocoo.org/ | |
|
125 | .. _GPL: http://www.gnu.org/licenses/gpl.html | |
|
126 | .. _vcs: http://pypi.python.org/pypi/vcs No newline at end of file |
@@ -3,6 +3,21 b'' | |||
|
3 | 3 | Changelog |
|
4 | 4 | ========= |
|
5 | 5 | |
|
6 | 1.1.4 (**2011-02-19**) | |
|
7 | ====================== | |
|
8 | ||
|
9 | news | |
|
10 | ---- | |
|
11 | ||
|
12 | fixes | |
|
13 | ----- | |
|
14 | ||
|
15 | - fixed formencode import problem on settings page, that caused server crash | |
|
16 | when that page was accessed as first after server start | |
|
17 | - journal fixes | |
|
18 | - fixed option to access repository just by entering http://server/<repo_name> | |
|
19 | ||
|
20 | ||
|
6 | 21 | 1.1.3 (**2011-02-16**) |
|
7 | 22 | ====================== |
|
8 | 23 | |
@@ -29,7 +44,6 b' fixes' | |||
|
29 | 44 | - fixed #106 relation issues on databases different than sqlite |
|
30 | 45 | - fixed static files paths links to use of url() method |
|
31 | 46 | |
|
32 | ||
|
33 | 47 | 1.1.2 (**2011-01-12**) |
|
34 | 48 | ====================== |
|
35 | 49 |
@@ -6,4 +6,12 b' Contributing in RhodeCode' | |||
|
6 | 6 | If You would like to contribute to RhodeCode, please contact me, any help is |
|
7 | 7 | greatly appreciated. |
|
8 | 8 | |
|
9 | Preferable method Would be to fork RhodeCode repository from bitbucket | |
|
10 | https://bitbucket.org/marcinkuzminski/rhodecode and then open a pull request. | |
|
11 | This way it's easier for me to merge. | |
|
12 | ||
|
13 | To run RhodeCode in a development version You always need to install tip | |
|
14 | version of RhodeCode and VCS library. | |
|
15 | ||
|
16 | ||
|
9 | 17 | Thank You. |
@@ -22,16 +22,16 b' Rhodecode requires python 2.x greater th' | |||
|
22 | 22 | |
|
23 | 23 | Easiest way to install ``rhodecode`` is to run:: |
|
24 | 24 | |
|
25 | easy_install rhodecode | |
|
25 | easy_install rhodecode | |
|
26 | 26 | |
|
27 | 27 | Or:: |
|
28 | 28 | |
|
29 | pip install rhodecode | |
|
29 | pip install rhodecode | |
|
30 | 30 | |
|
31 | 31 | If you prefer to install manually simply grab latest release from |
|
32 |
http://pypi.python.org/pypi/ |
|
|
32 | http://pypi.python.org/pypi/rhodecode, decompress archive and run:: | |
|
33 | 33 | |
|
34 | python setup.py install | |
|
34 | python setup.py install | |
|
35 | 35 | |
|
36 | 36 | |
|
37 | 37 | Step by step installation example |
@@ -39,32 +39,45 b' Step by step installation example' | |||
|
39 | 39 | |
|
40 | 40 | |
|
41 | 41 | - Assuming You have installed virtualenv_ create one using. |
|
42 | The `--no-site-packages` will make sure non of Your system libs are linked | |
|
43 | with this virtualenv_ | |
|
44 | 42 | |
|
45 | 43 | :: |
|
46 | 44 | |
|
47 | virtualenv --no-site-packages /var/www/rhodecode-venv | |
|
45 | virtualenv --no-site-packages /var/www/rhodecode-venv | |
|
46 | ||
|
47 | ||
|
48 | .. note:: Using ``--no-site-packages`` when generating your | |
|
49 | virtualenv is *very important*. This flag provides the necessary | |
|
50 | isolation for running the set of packages required by | |
|
51 | RhodeCode. If you do not specify ``--no-site-packages``, | |
|
52 | it's possible that RhodeCode will not install properly into | |
|
53 | the virtualenv, or, even if it does, may not run properly, | |
|
54 | depending on the packages you've already got installed into your | |
|
55 | Python's "main" site-packages dir. | |
|
56 | ||
|
48 | 57 |
|
|
49 | 58 | - this will install new virtualenv_ into `/var/www/rhodecode-venv`. |
|
50 | 59 | - Activate the virtualenv_ by running |
|
51 | 60 | |
|
52 | 61 | :: |
|
53 | 62 | |
|
54 | source /var/www/rhodecode-venv/bin/activate | |
|
63 | source /var/www/rhodecode-venv/bin/activate | |
|
64 | ||
|
65 | .. note:: If you're on UNIX, *do not* use ``sudo`` to run the | |
|
66 | ``virtualenv`` script. It's perfectly acceptable (and desirable) | |
|
67 | to create a virtualenv as a normal user. | |
|
55 | 68 | |
|
56 | 69 | - Make a folder for rhodecode somewhere on the filesystem for example |
|
57 | 70 | |
|
58 | 71 | :: |
|
59 | 72 | |
|
60 | mkdir /var/www/rhodecode | |
|
73 | mkdir /var/www/rhodecode | |
|
61 | 74 | |
|
62 | 75 | |
|
63 | 76 | - Run this command to install rhodecode |
|
64 | 77 | |
|
65 | 78 | :: |
|
66 | 79 | |
|
67 | easy_install rhodecode | |
|
80 | easy_install rhodecode | |
|
68 | 81 | |
|
69 | 82 | - this will install rhodecode together with pylons |
|
70 | 83 | and all other required python libraries |
@@ -7,7 +7,7 b' Setup' | |||
|
7 | 7 | Setting up the application |
|
8 | 8 | -------------------------- |
|
9 | 9 | |
|
10 | First You'll ned to create RhodeCode config file. Run the following command | |
|
10 | First You'll need to create RhodeCode config file. Run the following command | |
|
11 | 11 | to do this |
|
12 | 12 | |
|
13 | 13 | :: |
@@ -19,8 +19,10 b' to do this' | |||
|
19 | 19 | email settings, usage of static files, cache, celery settings and logging. |
|
20 | 20 | |
|
21 | 21 | |
|
22 | Next we need to create the database. I'll recommend to use sqlite (default) | |
|
23 | or postgresql. Make sure You properly adjust the db url in the .ini file to use | |
|
24 | other than the default sqlite database | |
|
22 | 25 | |
|
23 | Next we need to create the database. | |
|
24 | 26 | |
|
25 | 27 | :: |
|
26 | 28 | |
@@ -35,7 +37,7 b' Next we need to create the database.' | |||
|
35 | 37 | interface will work even without such an access but, when trying to do a |
|
36 | 38 | push it'll eventually fail with permission denied errors. |
|
37 | 39 | |
|
38 |
You are ready to use |
|
|
40 | You are ready to use RhodeCode, to run it simply execute | |
|
39 | 41 | |
|
40 | 42 | :: |
|
41 | 43 | |
@@ -50,37 +52,64 b' You are ready to use rhodecode, to run i' | |||
|
50 | 52 | anonymous, permissions settings. As well as edit more advanced options on |
|
51 | 53 | users and repositories |
|
52 | 54 | |
|
55 | Using RhodeCode with SSH | |
|
56 | ------------------------ | |
|
57 | ||
|
58 | RhodeCode repository structures are kept in directories with the same name | |
|
59 | as the project, when using repository groups, each group is a a subdirectory. | |
|
60 | This will allow You to use ssh for accessing repositories quite easy. There | |
|
61 | are some exceptions when using ssh for accessing repositories. | |
|
62 | ||
|
63 | You have to make sure that the webserver as well as the ssh users have unix | |
|
64 | permission for directories. Secondly when using ssh rhodecode will not | |
|
65 | authenticate those requests and permissions set by the web interface will not | |
|
66 | work on the repositories accessed via ssh. There is a solution to this to use | |
|
67 | auth hooks, that connects to rhodecode db, and runs check functions for | |
|
68 | permissions. | |
|
69 | ||
|
70 | ||
|
71 | if Your main directory (the same as set in RhodeCode settings) is for example | |
|
72 | set for to **/home/hg** and repository You are using is `rhodecode` | |
|
73 | ||
|
74 | The command runned should look like this:: | |
|
75 | ||
|
76 | hg clone ssh://user@server.com/home/hg/rhodecode | |
|
77 | ||
|
78 | Using external tools such as mercurial server or using ssh key based auth is | |
|
79 | fully supported. | |
|
53 | 80 | |
|
54 | 81 | Setting up Whoosh full text search |
|
55 | 82 | ---------------------------------- |
|
56 | 83 | |
|
57 |
|
|
|
58 | passing repo locations to index, as well as Your config file that stores | |
|
59 | whoosh index files locations. There is possible to pass `-f` to the options | |
|
84 | Starting from version 1.1 whoosh index can be build using paster command. | |
|
85 | You have to specify the config file that stores location of index, and | |
|
86 | location of repositories (`--repo-location`). | |
|
87 | ||
|
88 | There is possible also to pass `-f` to the options | |
|
60 | 89 | to enable full index rebuild. Without that indexing will run always in in |
|
61 | 90 | incremental mode. |
|
62 | 91 | |
|
63 | :: | |
|
92 | incremental mode:: | |
|
64 | 93 | |
|
65 |
|
|
|
94 | paster make-index production.ini --repo-location=<location for repos> | |
|
95 | ||
|
66 | 96 |
|
|
67 | for full index rebuild You can use | |
|
68 | 97 |
|
|
69 | :: | |
|
98 | for full index rebuild You can use:: | |
|
70 | 99 | |
|
71 |
|
|
|
100 | paster make-index production.ini -f --repo-location=<location for repos> | |
|
72 | 101 | |
|
73 | 102 | - For full text search You can either put crontab entry for |
|
74 | 103 | |
|
75 | This command can be run even from crontab in order to do periodical | |
|
76 | index builds and keep Your index always up to date. An example entry might | |
|
77 | look like this | |
|
104 | In order to do periodical index builds and keep Your index always up to date. | |
|
105 | It's recommended to do a crontab entry for incremental indexing. | |
|
106 | An example entry might look like this | |
|
78 | 107 | |
|
79 | 108 | :: |
|
80 | 109 | |
|
81 | 110 | /path/to/python/bin/paster /path/to/rhodecode/production.ini --repo-location=<location for repos> |
|
82 | 111 | |
|
83 | When using incremental(default) mode whoosh will check last modification date | |
|
112 | When using incremental (default) mode whoosh will check last modification date | |
|
84 | 113 | of each file and add it to reindex if newer file is available. Also indexing |
|
85 | 114 | daemon checks for removed files and removes them from index. |
|
86 | 115 | |
@@ -93,7 +122,7 b' Setting up LDAP support' | |||
|
93 | 122 | ----------------------- |
|
94 | 123 | |
|
95 | 124 | RhodeCode starting from version 1.1 supports ldap authentication. In order |
|
96 |
to use |
|
|
125 | to use LDAP, You have to install python-ldap_ package. This package is available | |
|
97 | 126 | via pypi, so You can install it by running |
|
98 | 127 | |
|
99 | 128 | :: |
@@ -157,6 +186,7 b' In order to make start using celery run:' | |||
|
157 | 186 | |
|
158 | 187 | paster celeryd <configfile.ini> |
|
159 | 188 | |
|
189 | ||
|
160 | 190 | .. note:: |
|
161 | 191 | Make sure You run this command from same virtualenv, and with the same user |
|
162 | 192 | that rhodecode runs. |
@@ -176,21 +206,21 b' Nginx virtual host example' | |||
|
176 | 206 | |
|
177 | 207 | Sample config for nginx using proxy:: |
|
178 | 208 | |
|
179 | server { | |
|
180 | listen 80; | |
|
181 | server_name hg.myserver.com; | |
|
182 | access_log /var/log/nginx/rhodecode.access.log; | |
|
183 | error_log /var/log/nginx/rhodecode.error.log; | |
|
184 | location / { | |
|
185 | root /var/www/rhodecode/rhodecode/public/; | |
|
186 | if (!-f $request_filename){ | |
|
187 | proxy_pass http://127.0.0.1:5000; | |
|
188 | } | |
|
189 | #this is important if You want to use https !!! | |
|
190 | proxy_set_header X-Url-Scheme $scheme; | |
|
191 | include /etc/nginx/proxy.conf; | |
|
192 | } | |
|
193 | } | |
|
209 | server { | |
|
210 | listen 80; | |
|
211 | server_name hg.myserver.com; | |
|
212 | access_log /var/log/nginx/rhodecode.access.log; | |
|
213 | error_log /var/log/nginx/rhodecode.error.log; | |
|
214 | location / { | |
|
215 | root /var/www/rhodecode/rhodecode/public/; | |
|
216 | if (!-f $request_filename){ | |
|
217 | proxy_pass http://127.0.0.1:5000; | |
|
218 | } | |
|
219 | #this is important if You want to use https !!! | |
|
220 | proxy_set_header X-Url-Scheme $scheme; | |
|
221 | include /etc/nginx/proxy.conf; | |
|
222 | } | |
|
223 | } | |
|
194 | 224 | |
|
195 | 225 | Here's the proxy.conf. It's tuned so it'll not timeout on long |
|
196 | 226 | pushes and also on large pushes:: |
@@ -207,20 +237,20 b' pushes and also on large pushes::' | |||
|
207 | 237 | proxy_connect_timeout 3600; |
|
208 | 238 | proxy_send_timeout 3600; |
|
209 | 239 | proxy_read_timeout 3600; |
|
210 |
proxy_buffer_size |
|
|
211 |
proxy_buffers |
|
|
240 | proxy_buffer_size 16k; | |
|
241 | proxy_buffers 4 16k; | |
|
212 | 242 | proxy_busy_buffers_size 64k; |
|
213 | 243 | proxy_temp_file_write_size 64k; |
|
214 | 244 | |
|
215 | 245 | Also when using root path with nginx You might set the static files to false |
|
216 | 246 | in production.ini file:: |
|
217 | 247 | |
|
218 | [app:main] | |
|
219 | use = egg:rhodecode | |
|
220 | full_stack = true | |
|
221 | static_files = false | |
|
222 | lang=en | |
|
223 | cache_dir = %(here)s/data | |
|
248 | [app:main] | |
|
249 | use = egg:rhodecode | |
|
250 | full_stack = true | |
|
251 | static_files = false | |
|
252 | lang=en | |
|
253 | cache_dir = %(here)s/data | |
|
224 | 254 | |
|
225 | 255 | To not have the statics served by the application. And improve speed. |
|
226 | 256 | |
@@ -257,6 +287,29 b' Additional tutorial' | |||
|
257 | 287 | http://wiki.pylonshq.com/display/pylonscookbook/Apache+as+a+reverse+proxy+for+Pylons |
|
258 | 288 | |
|
259 | 289 | |
|
290 | Apache as subdirectory | |
|
291 | ---------------------- | |
|
292 | ||
|
293 | ||
|
294 | Apache subdirectory part:: | |
|
295 | ||
|
296 | <Location /rhodecode> | |
|
297 | ProxyPass http://127.0.0.1:59542/rhodecode | |
|
298 | ProxyPassReverse http://127.0.0.1:59542/rhodecode | |
|
299 | SetEnvIf X-Url-Scheme https HTTPS=1 | |
|
300 | </Location> | |
|
301 | ||
|
302 | Besides the regular apache setup You'll need to add such part to .ini file:: | |
|
303 | ||
|
304 | filter-with = proxy-prefix | |
|
305 | ||
|
306 | Add the following at the end of the .ini file:: | |
|
307 | ||
|
308 | [filter:proxy-prefix] | |
|
309 | use = egg:PasteDeploy#prefix | |
|
310 | prefix = /<someprefix> | |
|
311 | ||
|
312 | ||
|
260 | 313 | Apache's example FCGI config |
|
261 | 314 | ---------------------------- |
|
262 | 315 | |
@@ -293,10 +346,13 b' Troubleshooting' | |||
|
293 | 346 | |
|
294 | 347 | - make sure You set a proper max_body_size for the http server |
|
295 | 348 | |
|
349 | - Apache doesn't pass basicAuth on pull/push ? | |
|
296 | 350 | |
|
351 | - Make sure You added `WSGIPassAuthorization true` | |
|
297 | 352 | |
|
298 | 353 | .. _virtualenv: http://pypi.python.org/pypi/virtualenv |
|
299 | 354 | .. _python: http://www.python.org/ |
|
300 | 355 | .. _mercurial: http://mercurial.selenic.com/ |
|
301 | 356 | .. _celery: http://celeryproject.org/ |
|
302 | .. _rabbitmq: http://www.rabbitmq.com/ No newline at end of file | |
|
357 | .. _rabbitmq: http://www.rabbitmq.com/ | |
|
358 | .. _python-ldap: http://www.python-ldap.org/ |
@@ -25,6 +25,11 b' This will display any changes made from ' | |||
|
25 | 25 | current config. And tries to do an automerge. It's always better to do a backup |
|
26 | 26 | of config file and recheck the content after merge. |
|
27 | 27 | |
|
28 | .. note:: | |
|
29 | The next steps only apply to upgrading from non bugfix releases eg. from | |
|
30 | any minor or major releases. Bugfix releases (eg. 1.1.2->1.1.3) will | |
|
31 | not have any database schema changes or whoosh library updates | |
|
32 | ||
|
28 | 33 | It's also good to rebuild the whoosh index since after upgrading the whoosh |
|
29 | 34 | version there could be introduced incompatible index changes. |
|
30 | 35 | |
@@ -33,7 +38,7 b' The last step is to upgrade the database' | |||
|
33 | 38 | |
|
34 | 39 | :: |
|
35 | 40 | |
|
36 | paster upgrade-db production.ini | |
|
41 | paster upgrade-db production.ini | |
|
37 | 42 | |
|
38 | 43 | This will upgrade schema, as well as update some default on the database, |
|
39 | 44 | always recheck the settings of the application, if there are no new options |
@@ -27,7 +27,7 b'' | |||
|
27 | 27 | # MA 02110-1301, USA. |
|
28 | 28 | |
|
29 | 29 | |
|
30 |
VERSION = (1, 1, |
|
|
30 | VERSION = (1, 1, 4) | |
|
31 | 31 | __version__ = '.'.join((str(each) for each in VERSION[:4])) |
|
32 | 32 | __dbversion__ = 2 #defines current db version for migrations |
|
33 | 33 |
@@ -164,6 +164,8 b' def make_map(config):' | |||
|
164 | 164 | map.connect('raw_changeset_home', '/{repo_name:.*}/raw-changeset/{revision}', |
|
165 | 165 | controller='changeset', action='raw_changeset', revision='tip', |
|
166 | 166 | conditions=dict(function=check_repo)) |
|
167 | map.connect('summary_home_', '/{repo_name:.*}', | |
|
168 | controller='summary', conditions=dict(function=check_repo)) | |
|
167 | 169 | map.connect('summary_home', '/{repo_name:.*}/summary', |
|
168 | 170 | controller='summary', conditions=dict(function=check_repo)) |
|
169 | 171 | map.connect('shortlog_home', '/{repo_name:.*}/shortlog', |
@@ -27,8 +27,9 b'' | |||
|
27 | 27 | |
|
28 | 28 | import logging |
|
29 | 29 | import traceback |
|
30 | import formencode | |
|
30 | 31 | |
|
31 | import formencode | |
|
32 | from formencode import htmlfill | |
|
32 | 33 | |
|
33 | 34 | from pylons import tmpl_context as c, request, url |
|
34 | 35 | from pylons.controllers.util import redirect |
@@ -70,7 +71,7 b' class SettingsController(BaseController)' | |||
|
70 | 71 | defaults.update({'perm_%s' % p.user.username: |
|
71 | 72 | p.permission.permission_name}) |
|
72 | 73 | |
|
73 |
return |
|
|
74 | return htmlfill.render( | |
|
74 | 75 | render('settings/repo_settings.html'), |
|
75 | 76 | defaults=defaults, |
|
76 | 77 | encoding="UTF-8", |
@@ -95,7 +96,7 b' class SettingsController(BaseController)' | |||
|
95 | 96 | c.repo_info = repo_model.get_by_repo_name(repo_name) |
|
96 | 97 | c.users_array = repo_model.get_users_js() |
|
97 | 98 | errors.value.update({'user':c.repo_info.user.username}) |
|
98 |
return |
|
|
99 | return htmlfill.render( | |
|
99 | 100 | render('settings/repo_settings.html'), |
|
100 | 101 | defaults=errors.value, |
|
101 | 102 | errors=errors.error_dict or {}, |
@@ -180,7 +181,7 b' class SettingsController(BaseController)' | |||
|
180 | 181 | c.new_repo = errors.value['fork_name'] |
|
181 | 182 | r = render('settings/repo_fork.html') |
|
182 | 183 | |
|
183 |
return |
|
|
184 | return htmlfill.render( | |
|
184 | 185 | r, |
|
185 | 186 | defaults=errors.value, |
|
186 | 187 | errors=errors.error_dict or {}, |
@@ -423,30 +423,28 b' def action_parser(user_log):' | |||
|
423 | 423 | action, action_params = x |
|
424 | 424 | |
|
425 | 425 | def get_cs_links(): |
|
426 | if action == 'push': | |
|
427 | revs_limit = 5 | |
|
428 | revs = action_params.split(',') | |
|
429 | cs_links = " " + ', '.join ([link(rev, | |
|
430 | url('changeset_home', | |
|
431 | repo_name=user_log.repository.repo_name, | |
|
432 | revision=rev)) for rev in revs[:revs_limit] ]) | |
|
433 | if len(revs) > revs_limit: | |
|
434 | uniq_id = revs[0] | |
|
435 | html_tmpl = ('<span> %s ' | |
|
436 | '<a class="show_more" id="_%s" href="#">%s</a> ' | |
|
437 | '%s</span>') | |
|
438 | cs_links += html_tmpl % (_('and'), uniq_id, _('%s more') \ | |
|
439 |
|
|
|
440 | _('revisions')) | |
|
426 | revs_limit = 5 | |
|
427 | revs = action_params.split(',') | |
|
428 | cs_links = " " + ', '.join ([link(rev, | |
|
429 | url('changeset_home', | |
|
430 | repo_name=user_log.repository.repo_name, | |
|
431 | revision=rev)) for rev in revs[:revs_limit] ]) | |
|
432 | if len(revs) > revs_limit: | |
|
433 | uniq_id = revs[0] | |
|
434 | html_tmpl = ('<span> %s ' | |
|
435 | '<a class="show_more" id="_%s" href="#">%s</a> ' | |
|
436 | '%s</span>') | |
|
437 | cs_links += html_tmpl % (_('and'), uniq_id, _('%s more') \ | |
|
438 | % (len(revs) - revs_limit), | |
|
439 | _('revisions')) | |
|
441 | 440 | |
|
442 |
|
|
|
443 |
|
|
|
444 |
|
|
|
445 |
|
|
|
446 |
|
|
|
441 | html_tmpl = '<span id="%s" style="display:none"> %s </span>' | |
|
442 | cs_links += html_tmpl % (uniq_id, ', '.join([link(rev, | |
|
443 | url('changeset_home', | |
|
444 | repo_name=user_log.repository.repo_name, | |
|
445 | revision=rev)) for rev in revs[revs_limit:] ])) | |
|
447 | 446 | |
|
448 |
|
|
|
449 | return '' | |
|
447 | return cs_links | |
|
450 | 448 | |
|
451 | 449 | def get_fork_name(): |
|
452 | 450 | repo_name = action_params |
@@ -455,14 +453,14 b' def action_parser(user_log):' | |||
|
455 | 453 | |
|
456 | 454 | map = {'user_deleted_repo':(_('[deleted] repository'), None), |
|
457 | 455 | 'user_created_repo':(_('[created] repository'), None), |
|
458 | 'user_forked_repo':(_('[forked] repository'), get_fork_name), | |
|
456 | 'user_forked_repo':(_('[forked] repository as'), get_fork_name), | |
|
459 | 457 | 'user_updated_repo':(_('[updated] repository'), None), |
|
460 | 458 | 'admin_deleted_repo':(_('[delete] repository'), None), |
|
461 | 459 | 'admin_created_repo':(_('[created] repository'), None), |
|
462 | 460 | 'admin_forked_repo':(_('[forked] repository'), None), |
|
463 | 461 | 'admin_updated_repo':(_('[updated] repository'), None), |
|
464 |
'push':(_('[pushed] |
|
|
465 |
'pull':(_('[pulled] |
|
|
462 | 'push':(_('[pushed] '), get_cs_links), | |
|
463 | 'pull':(_('[pulled] '), None), | |
|
466 | 464 | 'started_following_repo':(_('[started following] repository'), None), |
|
467 | 465 | 'stopped_following_repo':(_('[stopped following] repository'), None), |
|
468 | 466 | } |
General Comments 0
You need to be logged in to leave comments.
Login now