Show More
@@ -56,6 +56,15 b' use_gravatar = true' | |||
|
56 | 56 | container_auth_enabled = false |
|
57 | 57 | proxypass_auth_enabled = false |
|
58 | 58 | |
|
59 | ## overwrite schema of clone url | |
|
60 | # available vars: | |
|
61 | # scheme - http/https | |
|
62 | # user - current user | |
|
63 | # pass - password | |
|
64 | # netloc - network location | |
|
65 | # path - usually repo_name | |
|
66 | # clone_uri = {scheme}://{user}{pass}{netloc}{path} | |
|
67 | ||
|
59 | 68 | #################################### |
|
60 | 69 | ### CELERY CONFIG #### |
|
61 | 70 | #################################### |
@@ -16,6 +16,8 b' news' | |||
|
16 | 16 | - #215 rst and markdown README files support |
|
17 | 17 | - #252 pass-through user identity |
|
18 | 18 | - hover top menu |
|
19 | - configurable clone url posibility to specify ssh:// manually as | |
|
20 | alternative clone url. | |
|
19 | 21 | |
|
20 | 22 | fixes |
|
21 | 23 | ----- |
@@ -56,6 +56,14 b' use_gravatar = true' | |||
|
56 | 56 | container_auth_enabled = false |
|
57 | 57 | proxypass_auth_enabled = false |
|
58 | 58 | |
|
59 | ## available vars | |
|
60 | ## scheme - http/https | |
|
61 | ## user - current user | |
|
62 | ## pass - password | |
|
63 | ## netloc - network location | |
|
64 | ## path - usually repo_name | |
|
65 | clone_uri = {scheme}://{user}{pass}{netloc}{path} | |
|
66 | ||
|
59 | 67 | #################################### |
|
60 | 68 | ### CELERY CONFIG #### |
|
61 | 69 | #################################### |
@@ -56,6 +56,15 b' use_gravatar = true' | |||
|
56 | 56 | container_auth_enabled = false |
|
57 | 57 | proxypass_auth_enabled = false |
|
58 | 58 | |
|
59 | ## overwrite schema of clone url | |
|
60 | # available vars: | |
|
61 | # scheme - http/https | |
|
62 | # user - current user | |
|
63 | # pass - password | |
|
64 | # netloc - network location | |
|
65 | # path - usually repo_name | |
|
66 | # clone_uri = {scheme}://{user}{pass}{netloc}{path} | |
|
67 | ||
|
59 | 68 | #################################### |
|
60 | 69 | ### CELERY CONFIG #### |
|
61 | 70 | #################################### |
@@ -29,11 +29,12 b' import logging' | |||
|
29 | 29 | from time import mktime |
|
30 | 30 | from datetime import timedelta, date |
|
31 | 31 | from itertools import product |
|
32 | from urlparse import urlparse | |
|
32 | 33 | |
|
33 | 34 | from vcs.exceptions import ChangesetError, EmptyRepositoryError, \ |
|
34 | 35 | NodeDoesNotExistError |
|
35 | 36 | |
|
36 | from pylons import tmpl_context as c, request, url | |
|
37 | from pylons import tmpl_context as c, request, url, config | |
|
37 | 38 | from pylons.i18n.translation import _ |
|
38 | 39 | |
|
39 | 40 | from beaker.cache import cache_region, region_invalidate |
@@ -86,18 +87,19 b' class SummaryController(BaseRepoControll' | |||
|
86 | 87 | username = str(self.rhodecode_user.username) |
|
87 | 88 | password = '@' |
|
88 | 89 | |
|
89 | if e.get('wsgi.url_scheme') == 'https': | |
|
90 | split_s = 'https://' | |
|
91 | else: | |
|
92 | split_s = 'http://' | |
|
90 | parsed_url = urlparse(url.current(qualified=True)) | |
|
91 | ||
|
92 | default_clone_uri = '{scheme}://{user}{pass}{netloc}{path}' | |
|
93 | ||
|
94 | uri_tmpl = config.get('clone_uri',default_clone_uri) | |
|
95 | uri_tmpl = uri_tmpl.replace('{','%(').replace('}',')s') | |
|
93 | 96 | |
|
94 | qualified_uri = [split_s] + [url.current(qualified=True)\ | |
|
95 | .split(split_s)[-1]] | |
|
96 | uri = u'%(proto)s%(user)s%(pass)s%(rest)s' \ | |
|
97 | % {'user': username, | |
|
97 | uri = uri_tmpl % {'user': username, | |
|
98 | 98 | 'pass': password, |
|
99 |
' |
|
|
100 |
' |
|
|
99 | 'scheme': parsed_url.scheme, | |
|
100 | 'netloc':parsed_url.netloc, | |
|
101 | 'path':parsed_url.path} | |
|
102 | ||
|
101 | 103 | c.clone_repo_url = uri |
|
102 | 104 | c.repo_tags = OrderedDict() |
|
103 | 105 | for name, hash in c.rhodecode_repo.tags.items()[:10]: |
General Comments 0
You need to be logged in to leave comments.
Login now