Changeset - 53d766fc9782
[Not reviewed]
default
0 8 0
Thomas De Schampheleire - 11 years ago 2015-02-03 21:39:31
thomas.de_schampheleire@alcatel-lucent.com
spelling: consistent capitalization of URL

Change Url / url into URL.
Additionally, convert the sole use of 'Uri' to URL.
8 files changed with 19 insertions and 19 deletions:
0 comments (0 inline, 0 general)
kallithea/model/validators.py
Show inline comments
 
@@ -468,28 +468,28 @@ def ValidCloneUri():
 
                raise NotImplementedError()
 
            else:
 
                raise Exception('clone from URI %s not allowed' % (url))
 

	
 
    class _validator(formencode.validators.FancyValidator):
 
        messages = {
 
            'clone_uri': _(u'invalid clone url'),
 
            'invalid_clone_uri': _(u'Invalid clone url, provide a '
 
                                    'valid clone http(s)/svn+http(s)/ssh url')
 
            'clone_uri': _(u'invalid clone URL'),
 
            'invalid_clone_uri': _(u'Invalid clone URL, provide a '
 
                                    'valid clone http(s)/svn+http(s)/ssh URL')
 
        }
 

	
 
        def validate_python(self, value, state):
 
            repo_type = value.get('repo_type')
 
            url = value.get('clone_uri')
 

	
 
            if not url:
 
                pass
 
            else:
 
                try:
 
                    url_handler(repo_type, url, make_ui('db', clear_session=False))
 
                except Exception:
 
                    log.exception('Url validation failed')
 
                    log.exception('URL validation failed')
 
                    msg = M(self, 'clone_uri')
 
                    raise formencode.Invalid(msg, value, state,
 
                        error_dict=dict(clone_uri=msg)
 
                    )
 
    return _validator
 

	
kallithea/templates/admin/repos/repo_add_base.html
Show inline comments
 
@@ -21,13 +21,13 @@ ${h.form(url('repos'))}
 
        <div id="remote_clone" class="field" style="display: none">
 
            <div class="label">
 
                <label for="clone_uri">${_('Clone from')}:</label>
 
            </div>
 
            <div class="input">
 
                ${h.text('clone_uri',class_="small")}
 
                <span class="help-block">${_('Optional url from which repository should be cloned.')}</span>
 
                <span class="help-block">${_('Optional URL from which repository should be cloned.')}</span>
 
            </div>
 
        </div>
 
        <div class="field">
 
            <div class="label label-textarea">
 
                <label for="repo_description">${_('Description')}:</label>
 
            </div>
kallithea/templates/admin/repos/repo_edit_remote.html
Show inline comments
 
%if c.repo_info.clone_uri:
 
<div style="font-size: 20px; padding: 0px 0px 10px 0px">
 
   ${_('Remote url')}: <a href="${c.repo_info.clone_uri}">${c.repo_info.clone_uri_hidden}</a></li>
 
   ${_('Remote URL')}: <a href="${c.repo_info.clone_uri}">${c.repo_info.clone_uri_hidden}</a></li>
 
</div>
 
${h.form(url('edit_repo_remote', repo_name=c.repo_name), method='put')}
 
<div class="form">
 
   <div class="fields">
 
       ${h.submit('remote_pull_%s' % c.repo_info.repo_name,_('Pull Changes from Remote Location'),class_="btn btn-small",onclick="return confirm('"+_('Confirm to pull changes from remote side.')+"');")}
 
   </div>
 
</div>
 
${h.end_form()}
 
%else:
 
  <div style="font-size: 20px">
 
    ${_('This repository does not have a remote url set.')}
 
    ${_('This repository does not have a remote URL set.')}
 
  </div>
 
%endif
kallithea/templates/admin/repos/repo_edit_settings.html
Show inline comments
 
@@ -8,20 +8,20 @@ ${h.form(url('repo', repo_name=c.repo_in
 
                </div>
 
                <div class="input">
 
                    ${h.text('repo_name',class_="medium")}
 
                    <span class="help-block">${_('Non-changeable id')}: `_${c.repo_info.repo_id}` <span><a id="show_more_clone_id" href="#">${_('What is that?')}</a></span></span>
 
                    <span id="clone_id" class="help-block" style="display: none">
 
                        ${_('URL by id')}: `${c.repo_info.clone_url(with_id=True)}` </br>
 
                        ${_('''In case this repository is renamed or moved into another group the repository url changes.
 
                               Using the above url guarantees that this repository will always be accessible under such url.
 
                               Useful for CI systems, or any other cases that you need to hardcode the url into 3rd party service.''')}</span>
 
                        ${_('''In case this repository is renamed or moved into another group the repository URL changes.
 
                               Using the above URL guarantees that this repository will always be accessible under such URL.
 
                               Useful for CI systems, or any other cases that you need to hardcode the URL into 3rd party service.''')}</span>
 
                </div>
 
           </div>
 
           <div class="field">
 
               <div class="label">
 
                   <label for="clone_uri">${_('Clone uri')}:</label>
 
                   <label for="clone_uri">${_('Clone URL')}:</label>
 
               </div>
 
               <div class="input">
 
                   %if c.repo_info.clone_uri:
 
                    <div id="clone_uri_hidden" style="font-size: 14px">
 
                        <span id="clone_uri_hidden_value">${c.repo_info.clone_uri_hidden}</span>
 
                        <span style="cursor: pointer; padding: 0px 0px 5px 0px" id="edit_clone_uri"><i class="icon-edit"></i>${_('edit')}</span>
 
@@ -31,13 +31,13 @@ ${h.form(url('repo', repo_name=c.repo_in
 
                    </div>
 
                   %else:
 
                    ## not set yet, display form to set it
 
                    ${h.text('clone_uri',class_="medium")}
 
                    ${h.hidden('clone_uri_change', 'NEW')}
 
                   %endif
 
                 <span id="alter_clone_uri_help_block" class="help-block">${_('Url used for doing remote pulls.')}</span>
 
                 <span id="alter_clone_uri_help_block" class="help-block">${_('URL used for doing remote pulls.')}</span>
 
               </div>
 
            </div>
 
            <div class="field">
 
                <div class="label">
 
                    <label for="repo_group">${_('Repository group')}:</label>
 
                </div>
kallithea/templates/admin/settings/settings_system.html
Show inline comments
 
@@ -3,13 +3,13 @@
 
 elems = [
 
    (_('Kallithea version'), h.literal('%s <b><span style="color:#036185; text-decoration: underline;cursor: pointer" id="check_for_update" >%s</span></b>' % (c.kallithea_version, _('check for updates'))), ''),
 
    (_('Python version'), c.py_version, ''),
 
    (_('Platform'), c.platform, ''),
 
    (_('Git version'), c.git_version, ''),
 
    (_('Git path'), c.ini.get('git_path'), ''),
 
    (_('Upgrade info endpoint'), h.literal('%s <br/><span style="color:#999999">%s.</span>' % (c.update_url, _('Note: please make sure this server can access this url'))), '')
 
    (_('Upgrade info endpoint'), h.literal('%s <br/><span style="color:#999999">%s.</span>' % (c.update_url, _('Note: please make sure this server can access this URL'))), '')
 
 ]
 
%>
 

	
 
<div id="update_notice" style="display: none">
 
    <div style="padding: 5px 0px 5px 0px; color: #000000; font-weight: bold">${_('Checking for updates...')}</div>
 
</div>
kallithea/templates/admin/settings/settings_visual.html
Show inline comments
 
@@ -24,25 +24,25 @@ ${h.form(url('admin_settings_visual'), m
 
                        <label for="use_gravatar">${_('Use Gravatars in Kallithea')}</label>
 
                    </div>
 
                </div>
 
                <div class="field">
 
                    <div class="input">
 
                        ${h.text('gravatar_url', size=80)}
 
                        <span class="help-block">${_('''Gravatar url allows you to use another avatar server application.
 
                                                        The following variables of the url will be replaced accordingly.
 
                        <span class="help-block">${_('''Gravatar URL allows you to use another avatar server application.
 
                                                        The following variables of the URL will be replaced accordingly.
 
                                                        {scheme}    'http' or 'https' sent from running Kallithea server,
 
                                                        {email}     user email,
 
                                                        {md5email}  md5 hash of the user email (like at gravatar.com),
 
                                                        {size}      size of the image that is expected from the server application,
 
                                                        {netloc}    network location/server host of running Kallithea server''')}</span>
 
                    </div>
 
                </div>
 
                <div class="field">
 
                    <div class="input">
 
                        ${h.text('clone_uri_tmpl', size=80)}
 
                        <span class="help-block">${_('''Schema of clone url construction eg. '{scheme}://{user}@{netloc}/{repo}'.
 
                        <span class="help-block">${_('''Schema of clone URL construction eg. '{scheme}://{user}@{netloc}/{repo}'.
 
                                                        The following variables are available:
 
                                                        {scheme} 'http' or 'https' sent from running Kallithea server,
 
                                                        {user}   current user username,
 
                                                        {netloc} network location/server host of running Kallithea server,
 
                                                        {repo}   full repository name,
 
                                                        {repoid} ID of repository, can be used to contruct clone-by-id''')}</span>
kallithea/templates/summary/summary.html
Show inline comments
 
@@ -69,13 +69,13 @@ summary = lambda n:{False:'summary-short
 
    </div>
 
    <!-- end box / title -->
 
    <div class="form">
 
        <div id="summary" class="fields">
 
            <div class="field">
 
                <div class="label-summary">
 
                  <label>${_('Clone url')}:</label>
 
                  <label>${_('Clone URL')}:</label>
 
                </div>
 
                <div class="input ${summary(c.show_stats)}">
 
                  <input style="width:80%" type="text" id="clone_url" readonly="readonly" value="${c.clone_repo_url}"/>
 
                  <input style="display:none;width:80%" type="text" id="clone_url_id" readonly="readonly" value="${c.clone_repo_url_id}"/>
 
                  <div style="display:none" id="clone_by_name" class="btn btn-small">${_('Show by Name')}</div>
 
                  <div id="clone_by_id" class="btn btn-small">${_('Show by ID')}</div>
kallithea/tests/functional/test_admin_repos.py
Show inline comments
 
@@ -336,26 +336,26 @@ class _BaseTest(TestController):
 
        response = self.app.post(url('repos'),
 
                        fixture._get_repo_create_params(repo_private=False,
 
                                                repo_name=repo_name,
 
                                                repo_type=self.REPO_TYPE,
 
                                                repo_description=description,
 
                                                clone_uri='http://127.0.0.1/repo'))
 
        response.mustcontain('invalid clone url')
 
        response.mustcontain('invalid clone URL')
 

	
 

	
 
    def test_create_remote_repo_wrong_clone_uri_hg_svn(self):
 
        self.log_user()
 
        repo_name = self.NEW_REPO
 
        description = 'description for newly created repo'
 
        response = self.app.post(url('repos'),
 
                        fixture._get_repo_create_params(repo_private=False,
 
                                                repo_name=repo_name,
 
                                                repo_type=self.REPO_TYPE,
 
                                                repo_description=description,
 
                                                clone_uri='svn+http://127.0.0.1/repo'))
 
        response.mustcontain('invalid clone url')
 
        response.mustcontain('invalid clone URL')
 

	
 

	
 
    def test_delete(self):
 
        self.log_user()
 
        repo_name = 'vcs_test_new_to_delete_%s' % self.REPO_TYPE
 
        description = 'description for newly created repo'
0 comments (0 inline, 0 general)