Show More
@@ -56,6 +56,15 b' use_gravatar = true' | |||||
56 | container_auth_enabled = false |
|
56 | container_auth_enabled = false | |
57 | proxypass_auth_enabled = false |
|
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 | ### CELERY CONFIG #### |
|
69 | ### CELERY CONFIG #### | |
61 | #################################### |
|
70 | #################################### |
@@ -16,6 +16,8 b' news' | |||||
16 | - #215 rst and markdown README files support |
|
16 | - #215 rst and markdown README files support | |
17 | - #252 pass-through user identity |
|
17 | - #252 pass-through user identity | |
18 | - hover top menu |
|
18 | - hover top menu | |
|
19 | - configurable clone url posibility to specify ssh:// manually as | |||
|
20 | alternative clone url. | |||
19 |
|
21 | |||
20 | fixes |
|
22 | fixes | |
21 | ----- |
|
23 | ----- |
@@ -56,6 +56,14 b' use_gravatar = true' | |||||
56 | container_auth_enabled = false |
|
56 | container_auth_enabled = false | |
57 | proxypass_auth_enabled = false |
|
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 | ### CELERY CONFIG #### |
|
68 | ### CELERY CONFIG #### | |
61 | #################################### |
|
69 | #################################### |
@@ -56,6 +56,15 b' use_gravatar = true' | |||||
56 | container_auth_enabled = false |
|
56 | container_auth_enabled = false | |
57 | proxypass_auth_enabled = false |
|
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 | ### CELERY CONFIG #### |
|
69 | ### CELERY CONFIG #### | |
61 | #################################### |
|
70 | #################################### |
@@ -29,11 +29,12 b' import logging' | |||||
29 | from time import mktime |
|
29 | from time import mktime | |
30 | from datetime import timedelta, date |
|
30 | from datetime import timedelta, date | |
31 | from itertools import product |
|
31 | from itertools import product | |
|
32 | from urlparse import urlparse | |||
32 |
|
33 | |||
33 | from vcs.exceptions import ChangesetError, EmptyRepositoryError, \ |
|
34 | from vcs.exceptions import ChangesetError, EmptyRepositoryError, \ | |
34 | NodeDoesNotExistError |
|
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 | from pylons.i18n.translation import _ |
|
38 | from pylons.i18n.translation import _ | |
38 |
|
39 | |||
39 | from beaker.cache import cache_region, region_invalidate |
|
40 | from beaker.cache import cache_region, region_invalidate | |
@@ -86,18 +87,19 b' class SummaryController(BaseRepoControll' | |||||
86 | username = str(self.rhodecode_user.username) |
|
87 | username = str(self.rhodecode_user.username) | |
87 | password = '@' |
|
88 | password = '@' | |
88 |
|
89 | |||
89 | if e.get('wsgi.url_scheme') == 'https': |
|
90 | parsed_url = urlparse(url.current(qualified=True)) | |
90 | split_s = 'https://' |
|
91 | ||
91 | else: |
|
92 | default_clone_uri = '{scheme}://{user}{pass}{netloc}{path}' | |
92 | split_s = 'http://' |
|
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)\ |
|
97 | uri = uri_tmpl % {'user': username, | |
95 | .split(split_s)[-1]] |
|
|||
96 | uri = u'%(proto)s%(user)s%(pass)s%(rest)s' \ |
|
|||
97 | % {'user': username, |
|
|||
98 | 'pass': password, |
|
98 | 'pass': password, | |
99 |
' |
|
99 | 'scheme': parsed_url.scheme, | |
100 |
' |
|
100 | 'netloc':parsed_url.netloc, | |
|
101 | 'path':parsed_url.path} | |||
|
102 | ||||
101 | c.clone_repo_url = uri |
|
103 | c.clone_repo_url = uri | |
102 | c.repo_tags = OrderedDict() |
|
104 | c.repo_tags = OrderedDict() | |
103 | for name, hash in c.rhodecode_repo.tags.items()[:10]: |
|
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