Changeset - 8384eaabeb19
[Not reviewed]
beta
0 5 0
Marcin Kuzminski - 14 years ago 2011-11-03 02:00:53
marcin@python-works.com
configurable clone url
- posibility to specify ssh:// manually as alternative clone url.
5 files changed with 45 insertions and 15 deletions:
0 comments (0 inline, 0 general)
development.ini
Show inline comments
 
@@ -47,24 +47,33 @@ full_stack = true
 
static_files = true
 
lang=en
 
cache_dir = %(here)s/data
 
index_dir = %(here)s/data/index
 
app_instance_uuid = develop
 
cut_off_limit = 256000
 
force_https = false
 
commit_parse_limit = 25
 
use_gravatar = true
 
container_auth_enabled = false
 
proxypass_auth_enabled = false
 

	
 
## overwrite schema of clone url
 
# available vars:
 
# scheme - http/https
 
# user - current user
 
# pass - password 
 
# netloc - network location
 
# path - usually repo_name
 
# clone_uri = {scheme}://{user}{pass}{netloc}{path}
 

	
 
####################################
 
###        CELERY CONFIG        ####
 
####################################
 
use_celery = false
 
broker.host = localhost
 
broker.vhost = rabbitmqhost
 
broker.port = 5672
 
broker.user = rabbitmq
 
broker.password = qweqwe
 

	
 
celery.imports = rhodecode.lib.celerylib.tasks
 

	
docs/changelog.rst
Show inline comments
 
@@ -7,25 +7,27 @@ Changelog
 
1.3.0 (**XXXX-XX-XX**)
 
======================
 

	
 
:status: in-progress
 
:branch: beta
 

	
 
news
 
----
 

	
 
- #215 rst and markdown README files support
 
- #252 pass-through user identity
 
- hover top menu
 
 
 
- configurable clone url posibility to specify ssh:// manually as 
 
  alternative clone url.
 
   
 
fixes
 
-----
 

	
 
1.2.3 (**2011-11-02**)
 
======================
 

	
 
news
 
----
 

	
 
- added option to manage repos group for non admin users
 
- added following API methods for get_users, create_user, get_users_groups, 
 
  get_users_group, create_users_group, add_user_to_users_groups, get_repos, 
production.ini
Show inline comments
 
@@ -47,24 +47,32 @@ full_stack = true
 
static_files = true
 
lang=en
 
cache_dir = %(here)s/data
 
index_dir = %(here)s/data/index
 
app_instance_uuid = prod1234
 
cut_off_limit = 256000
 
force_https = false 
 
commit_parse_limit = 50
 
use_gravatar = true
 
container_auth_enabled = false
 
proxypass_auth_enabled = false
 

	
 
## available vars
 
## scheme - http/https
 
## user - current user
 
## pass - password 
 
## netloc - network location
 
## path - usually repo_name
 
clone_uri = {scheme}://{user}{pass}{netloc}{path}
 

	
 
####################################
 
###        CELERY CONFIG        ####
 
####################################
 
use_celery = false
 
broker.host = localhost
 
broker.vhost = rabbitmqhost
 
broker.port = 5672
 
broker.user = rabbitmq
 
broker.password = qweqwe
 

	
 
celery.imports = rhodecode.lib.celerylib.tasks
 

	
rhodecode/config/deployment.ini_tmpl
Show inline comments
 
@@ -47,24 +47,33 @@ full_stack = true
 
static_files = true
 
lang=en
 
cache_dir = %(here)s/data
 
index_dir = %(here)s/data/index
 
app_instance_uuid = ${app_instance_uuid}
 
cut_off_limit = 256000
 
force_https = false 
 
commit_parse_limit = 50
 
use_gravatar = true
 
container_auth_enabled = false
 
proxypass_auth_enabled = false
 

	
 
## overwrite schema of clone url
 
# available vars:
 
# scheme - http/https
 
# user - current user
 
# pass - password 
 
# netloc - network location
 
# path - usually repo_name
 
# clone_uri = {scheme}://{user}{pass}{netloc}{path}
 

	
 
####################################
 
###        CELERY CONFIG        ####
 
####################################
 
use_celery = false
 
broker.host = localhost
 
broker.vhost = rabbitmqhost
 
broker.port = 5672
 
broker.user = rabbitmq
 
broker.password = qweqwe
 

	
 
celery.imports = rhodecode.lib.celerylib.tasks
 

	
rhodecode/controllers/summary.py
Show inline comments
 
@@ -20,29 +20,30 @@
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 

	
 
import traceback
 
import calendar
 
import logging
 
from time import mktime
 
from datetime import timedelta, date
 
from itertools import product
 
from urlparse import urlparse
 

	
 
from vcs.exceptions import ChangesetError, EmptyRepositoryError, \
 
    NodeDoesNotExistError
 

	
 
from pylons import tmpl_context as c, request, url
 
from pylons import tmpl_context as c, request, url, config
 
from pylons.i18n.translation import _
 

	
 
from beaker.cache import cache_region, region_invalidate
 

	
 
from rhodecode.model.db import Statistics, CacheInvalidation
 
from rhodecode.lib import ALL_READMES, ALL_EXTS
 
from rhodecode.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator
 
from rhodecode.lib.base import BaseRepoController, render
 
from rhodecode.lib.utils import EmptyChangeset
 
from rhodecode.lib.markup_renderer import MarkupRenderer
 
from rhodecode.lib.celerylib import run_task
 
from rhodecode.lib.celerylib.tasks import get_commits_stats, \
 
@@ -70,43 +71,44 @@ class SummaryController(BaseRepoControll
 
        c.dbrepo = dbrepo = c.rhodecode_db_repo
 

	
 
        c.following = self.scm_model.is_following_repo(repo_name,
 
                                                self.rhodecode_user.user_id)
 

	
 
        def url_generator(**kw):
 
            return url('shortlog_home', repo_name=repo_name, size=10, **kw)
 

	
 
        c.repo_changesets = RepoPage(c.rhodecode_repo, page=1,
 
                                     items_per_page=10, url=url_generator)
 

	
 
        if self.rhodecode_user.username == 'default':
 
            #for default(anonymous) user we don't need to pass credentials
 
            # for default(anonymous) user we don't need to pass credentials
 
            username = ''
 
            password = ''
 
        else:
 
            username = str(self.rhodecode_user.username)
 
            password = '@'
 

	
 
        if e.get('wsgi.url_scheme') == 'https':
 
            split_s = 'https://'
 
        else:
 
            split_s = 'http://'
 

	
 
        qualified_uri = [split_s] + [url.current(qualified=True)\
 
                                     .split(split_s)[-1]]
 
        uri = u'%(proto)s%(user)s%(pass)s%(rest)s' \
 
                % {'user': username,
 
                     'pass': password,
 
                     'proto': qualified_uri[0],
 
                     'rest': qualified_uri[1]}
 
        parsed_url = urlparse(url.current(qualified=True))
 
        
 
        default_clone_uri = '{scheme}://{user}{pass}{netloc}{path}'
 
        
 
        uri_tmpl = config.get('clone_uri',default_clone_uri)
 
        uri_tmpl = uri_tmpl.replace('{','%(').replace('}',')s')
 
        
 
        uri =  uri_tmpl % {'user': username,
 
                           'pass': password,
 
                           'scheme': parsed_url.scheme,
 
                           'netloc':parsed_url.netloc,
 
                           'path':parsed_url.path}
 
        
 
        c.clone_repo_url = uri
 
        c.repo_tags = OrderedDict()
 
        for name, hash in c.rhodecode_repo.tags.items()[:10]:
 
            try:
 
                c.repo_tags[name] = c.rhodecode_repo.get_changeset(hash)
 
            except ChangesetError:
 
                c.repo_tags[name] = EmptyChangeset(hash)
 

	
 
        c.repo_branches = OrderedDict()
 
        for name, hash in c.rhodecode_repo.branches.items()[:10]:
 
            try:
 
                c.repo_branches[name] = c.rhodecode_repo.get_changeset(hash)
0 comments (0 inline, 0 general)