Changeset - acc05c33cc0c
rhodecode/controllers/changeset.py
Show inline comments
 
@@ -386,25 +386,25 @@ class ChangesetController(BaseRepoContro
 
            repo=c.rhodecode_db_repo.repo_id,
 
            user=c.rhodecode_user.user_id,
 
            revision=revision,
 
            f_path=request.POST.get('f_path'),
 
            line_no=request.POST.get('line'),
 
            status_change=(ChangesetStatus.get_status_lbl(status)
 
                           if status and change_status else None)
 
        )
 

	
 
        # get status if set !
 
        if status and change_status:
 
            # if latest status was from pull request and it's closed
 
            # disallow changing status ! 
 
            # disallow changing status !
 
            # dont_allow_on_closed_pull_request = True !
 

	
 
            try:
 
                ChangesetStatusModel().set_status(
 
                    c.rhodecode_db_repo.repo_id,
 
                    status,
 
                    c.rhodecode_user.user_id,
 
                    comm,
 
                    revision=revision,
 
                    dont_allow_on_closed_pull_request=True
 
                )
 
            except StatusChangeOnClosedPullRequestError:
rhodecode/lib/compat.py
Show inline comments
 
@@ -580,15 +580,12 @@ else:
 
            try:
 
                self.__flag = False
 
            finally:
 
                self.__cond.release()
 

	
 
        def wait(self, timeout=None):
 
            self.__cond.acquire()
 
            try:
 
                if not self.__flag:
 
                    self.__cond.wait(timeout)
 
            finally:
 
                self.__cond.release()
 

	
 

	
 

	
rhodecode/lib/dbmigrate/schema/db_1_3_0.py
Show inline comments
 
@@ -1308,13 +1308,13 @@ class PullRequest(Base, BaseModel):
 

	
 
    pull_request_id = Column('pull_request_id', Integer(), nullable=False, primary_key=True)
 
    title = Column('title', Unicode(256), nullable=True)
 
    description = Column('description', UnicodeText(10240), nullable=True)
 
    status = Column('status', Unicode(256), nullable=False, default=STATUS_NEW)
 
    created_on = Column('created_on', DateTime(timezone=False), nullable=False, default=datetime.datetime.now)
 
    updated_on = Column('updated_on', DateTime(timezone=False), nullable=False, default=datetime.datetime.now)
 
    user_id = Column("user_id", Integer(), ForeignKey('users.user_id'), nullable=False, unique=None)
 
    _revisions = Column('revisions', UnicodeText(20500))  # 500 revisions max
 
    org_repo_id = Column('org_repo_id', Integer(), ForeignKey('repositories.repo_id'), nullable=False)
 
    org_ref = Column('org_ref', Unicode(256), nullable=False)
 
    other_repo_id = Column('other_repo_id', Integer(), ForeignKey('repositories.repo_id'), nullable=False)
 
    other_ref = Column('other_ref', Unicode(256), nullable=False)
 
\ No newline at end of file
 
    other_ref = Column('other_ref', Unicode(256), nullable=False)
rhodecode/lib/dbmigrate/versions/006_version_1_4_0.py
Show inline comments
 
@@ -40,25 +40,25 @@ def upgrade(migrate_engine):
 
    #==========================================================================
 
    from rhodecode.lib.dbmigrate.schema.db_1_4_0 import PullRequestReviewers
 
    tbl = PullRequestReviewers.__table__
 
    tbl.create()
 

	
 
    #==========================================================================
 
    # CHANGESET STATUS
 
    #==========================================================================
 
    from rhodecode.lib.dbmigrate.schema.db_1_4_0 import ChangesetStatus
 
    tbl = ChangesetStatus.__table__
 
    tbl.create()
 

	
 
    ## RESET COMPLETLY THE metadata for sqlalchemy to use the 1_3_0 Base 
 
    ## RESET COMPLETLY THE metadata for sqlalchemy to use the 1_3_0 Base
 
    Base = declarative_base()
 
    Base.metadata.clear()
 
    Base.metadata = MetaData()
 
    Base.metadata.bind = migrate_engine
 
    meta.Base = Base
 

	
 
    #==========================================================================
 
    # USERS TABLE
 
    #==========================================================================
 
    from rhodecode.lib.dbmigrate.schema.db_1_3_0 import User
 
    tbl = User.__table__
 

	
rhodecode/lib/utils.py
Show inline comments
 
@@ -197,25 +197,25 @@ def get_repos(path, recursive=False):
 
                #check if this dir containts other repos for recursive scan
 
                rec_path = os.path.join(p, dirpath)
 
                if os.path.isdir(rec_path):
 
                    for inner_scm in _get_repos(rec_path):
 
                        yield inner_scm
 

	
 
    return _get_repos(path)
 

	
 

	
 
def is_valid_repo(repo_name, base_path, scm=None):
 
    """
 
    Returns True if given path is a valid repository False otherwise.
 
    If scm param is given also compare if given scm is the same as expected 
 
    If scm param is given also compare if given scm is the same as expected
 
    from scm parameter
 

	
 
    :param repo_name:
 
    :param base_path:
 
    :param scm:
 

	
 
    :return True: if given path is a valid repository
 
    """
 
    full_path = os.path.join(safe_str(base_path), safe_str(repo_name))
 

	
 
    try:
 
        scm_ = get_scm(full_path)
rhodecode/lib/vcs/utils/hgcompat.py
Show inline comments
 
@@ -6,13 +6,13 @@ from mercurial import archival, merge as
 
from mercurial.commands import clone, nullid, pull
 
from mercurial.context import memctx, memfilectx
 
from mercurial.error import RepoError, RepoLookupError, Abort
 
from mercurial.hgweb.common import get_contact
 
from mercurial.localrepo import localrepository
 
from mercurial.match import match
 
from mercurial.mdiff import diffopts
 
from mercurial.node import hex
 
from mercurial.encoding import tolocal
 
from mercurial import discovery
 
from mercurial import localrepo
 
from mercurial import scmutil
 
from mercurial.discovery import findcommonoutgoing
 
\ No newline at end of file
 
from mercurial.discovery import findcommonoutgoing
rhodecode/model/forms.py
Show inline comments
 
@@ -331,13 +331,13 @@ def PullRequestForm():
 

	
 
        user = v.UnicodeString(strip=True, required=True)
 
        org_repo = v.UnicodeString(strip=True, required=True)
 
        org_ref = v.UnicodeString(strip=True, required=True)
 
        other_repo = v.UnicodeString(strip=True, required=True)
 
        other_ref = v.UnicodeString(strip=True, required=True)
 
        revisions = All(v.NotReviewedRevisions()(), v.UniqueList(not_empty=True))
 
        review_members = v.UniqueList(not_empty=True)
 

	
 
        pullrequest_title = v.UnicodeString(strip=True, required=True, min=3)
 
        pullrequest_desc = v.UnicodeString(strip=True, required=False)
 

	
 
    return _PullRequestForm
 
\ No newline at end of file
 
    return _PullRequestForm
rhodecode/templates/admin/repos/repo_edit.html
Show inline comments
 
@@ -106,25 +106,25 @@
 
                    ${h.checkbox('enable_downloads',value="True")}
 
                    <span class="help-block">${_('Enable download menu on summary page.')}</span>
 
                </div>
 
            </div>
 
            <div class="field">
 
                <div class="label label-checkbox">
 
                    <label for="enable_locking">${_('Enable locking')}:</label>
 
                </div>
 
                <div class="checkboxes">
 
                    ${h.checkbox('enable_locking',value="True")}
 
                    <span class="help-block">${_('Enable lock-by-pulling on repository.')}</span>
 
                </div>
 
            </div>            
 
            </div>
 
            <div class="field">
 
                <div class="label">
 
                    <label for="user">${_('Owner')}:</label>
 
                </div>
 
                <div class="input input-medium ac">
 
                    <div class="perm_ac">
 
                       ${h.text('user',class_='yui-ac-input')}
 
                       <span class="help-block">${_('Change owner of this repository.')}</span>
 
                       <div id="owner_container"></div>
 
                    </div>
 
                </div>
 
             </div>
 
@@ -184,33 +184,33 @@
 
        %endif
 

	
 
        <h3>${_('Cache')}</h3>
 
        ${h.form(url('repo_cache', repo_name=c.repo_info.repo_name),method='delete')}
 
        <div class="form">
 
           <div class="fields">
 
               ${h.submit('reset_cache_%s' % c.repo_info.repo_name,_('Invalidate repository cache'),class_="ui-btn",onclick="return confirm('"+_('Confirm to invalidate repository cache')+"');")}
 
              <div class="field" style="border:none;color:#888">
 
              <ul>
 
                  <li>${_('Manually invalidate cache for this repository. On first access repository will be cached again')}
 
                  </li>
 
              </ul>
 
              </div>              
 
              </div>
 
              <div class="field" style="border:none;">
 
                ${_('List of cached values')}
 
                  <ul>
 
                  %for cache in c.repo_info.cache_keys:
 
                      <li>INSTANCE ID:${cache.prefix or '-'} ${cache.cache_args} CACHED: ${h.bool2icon(cache.cache_active)}</li>
 
                  %endfor
 
                  </ul>
 
              </div>                     
 
              </div>
 
           </div>
 
        </div>
 
        ${h.end_form()}
 

	
 
        <h3>${_('Public journal')}</h3>
 
        ${h.form(url('repo_public_journal', repo_name=c.repo_info.repo_name),method='put')}
 
        <div class="form">
 
          ${h.hidden('auth_token',str(h.get_token()))}
 
          <div class="field">
 
          %if c.in_public_journal:
 
            ${h.submit('set_public_%s' % c.repo_info.repo_name,_('Remove from public journal'),class_="ui-btn")}
 
          %else:
 
@@ -234,49 +234,49 @@
 
               ${h.submit('set_unlock' ,_('Unlock locked repo'),class_="ui-btn",onclick="return confirm('"+_('Confirm to unlock repository')+"');")}
 
               ${'Locked by %s on %s' % (h.person_by_id(c.repo_info.locked[0]),h.fmt_date(h.time_to_datetime(c.repo_info.locked[1])))}
 
              %else:
 
                ${h.submit('set_lock',_('lock repo'),class_="ui-btn",onclick="return confirm('"+_('Confirm to lock repository')+"');")}
 
                ${_('Repository is not locked')}
 
              %endif
 
           </div>
 
           <div class="field" style="border:none;color:#888">
 
           <ul>
 
                <li>${_('Force locking on repository. Works only when anonymous access is disabled')}
 
                </li>
 
           </ul>
 
           </div>           
 
           </div>
 
        </div>
 
        ${h.end_form()}
 

	
 
        <h3>${_('Set as fork of')}</h3>
 
        ${h.form(url('repo_as_fork', repo_name=c.repo_info.repo_name),method='put')}
 
        <div class="form">
 
           <div class="fields">
 
               ${h.select('id_fork_of','',c.repos_list,class_="medium")}
 
               ${h.submit('set_as_fork_%s' % c.repo_info.repo_name,_('set'),class_="ui-btn",)}
 
           </div>
 
               <div class="field" style="border:none;color:#888">
 
               <ul>
 
                    <li>${_('''Manually set this repository as a fork of another from the list''')}</li>
 
               </ul>
 
               </div>
 
        </div>        
 
        </div>
 
        ${h.end_form()}
 
        
 

	
 
        <h3>${_('Delete')}</h3>
 
        ${h.form(url('repo', repo_name=c.repo_info.repo_name),method='delete')}
 
        <div class="form">
 
           <div class="fields">
 
               ${h.submit('remove_%s' % c.repo_info.repo_name,_('Remove this repository'),class_="ui-btn red",onclick="return confirm('"+_('Confirm to delete this repository')+"');")}
 
           </div>
 
           <div class="field" style="border:none;color:#888">
 
           <ul>
 
                <li>${_('''This repository will be renamed in a special way in order to be unaccesible for RhodeCode and VCS systems.
 
                         If you need fully delete it from filesystem please do it manually''')}
 
                </li>
 
           </ul>
 
           </div>
 
        </div>
 
        ${h.end_form()}        
 
        ${h.end_form()}
 
</div>
 

	
 
</%def>
rhodecode/templates/admin/repos/repo_edit_perms.html
Show inline comments
 
@@ -65,26 +65,26 @@
 
        <td><input type="radio" value="repository.none" name="perm_new_member_{0}" id="perm_new_member_{0}"></td> \
 
        <td><input type="radio" value="repository.read" name="perm_new_member_{0}" id="perm_new_member_{0}"></td> \
 
        <td><input type="radio" value="repository.write" name="perm_new_member_{0}" id="perm_new_member_{0}"></td> \
 
        <td><input type="radio" value="repository.admin" name="perm_new_member_{0}" id="perm_new_member_{0}"></td> \
 
        <td class="ac"> \
 
            <div class="perm_ac" id="perm_ac_{0}"> \
 
                <input class="yui-ac-input" id="perm_new_member_name_{0}" name="perm_new_member_name_{0}" value="" type="text"> \
 
                <input id="perm_new_member_type_{0}" name="perm_new_member_type_{0}" value="" type="hidden">  \
 
                <div id="perm_container_{0}"></div> \
 
            </div> \
 
        </td> \
 
        <td></td>'""")
 
    %>    
 
    ## ADD HERE DYNAMICALLY NEW INPUTS FROM THE '_tmpl'    
 
    %>
 
    ## ADD HERE DYNAMICALLY NEW INPUTS FROM THE '_tmpl'
 
    <tr class="new_members last_new_member" id="add_perm_input"></tr>
 
    <tr>
 
        <td colspan="6">
 
            <span id="add_perm" class="add_icon" style="cursor: pointer;">
 
            ${_('Add another member')}
 
            </span>
 
        </td>
 
    </tr>
 
</table>
 
<script type="text/javascript">
 
function ajaxActionUser(user_id, field_id) {
 
    var sUrl = "${h.url('delete_repo_user',repo_name=c.repo_name)}";
rhodecode/templates/admin/repos_groups/repos_group_edit_perms.html
Show inline comments
 
@@ -49,26 +49,26 @@
 
        <td><input type="radio" value="group.none" name="perm_new_member_{0}" id="perm_new_member_{0}"></td> \
 
        <td><input type="radio" value="group.read" name="perm_new_member_{0}" id="perm_new_member_{0}"></td> \
 
        <td><input type="radio" value="group.write" name="perm_new_member_{0}" id="perm_new_member_{0}"></td> \
 
        <td><input type="radio" value="group.admin" name="perm_new_member_{0}" id="perm_new_member_{0}"></td> \
 
        <td class="ac"> \
 
            <div class="perm_ac" id="perm_ac_{0}"> \
 
                <input class="yui-ac-input" id="perm_new_member_name_{0}" name="perm_new_member_name_{0}" value="" type="text"> \
 
                <input id="perm_new_member_type_{0}" name="perm_new_member_type_{0}" value="" type="hidden">  \
 
                <div id="perm_container_{0}"></div> \
 
            </div> \
 
        </td> \
 
        <td></td>'""")
 
    %>    
 
    ## ADD HERE DYNAMICALLY NEW INPUTS FROM THE '_tmpl'    
 
    %>
 
    ## ADD HERE DYNAMICALLY NEW INPUTS FROM THE '_tmpl'
 
    <tr class="new_members last_new_member" id="add_perm_input"></tr>
 
    <tr>
 
        <td colspan="6">
 
            <span id="add_perm" class="add_icon" style="cursor: pointer;">
 
            ${_('Add another member')}
 
            </span>
 
        </td>
 
    </tr>
 
</table>
 
<script type="text/javascript">
 
function ajaxActionUser(user_id, field_id) {
 
    var sUrl = "${h.url('delete_repos_group_user_perm',group_name=c.repos_group.group_name)}";
rhodecode/templates/admin/repos_groups/repos_groups.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 
<%def name="title()">
 
    ${_('Repository group')} - ${c.rhodecode_name}
 
</%def>
 

	
 
<%def name="breadcrumbs()">
 
    <span class="groups_breadcrumbs"> 
 
    <span class="groups_breadcrumbs">
 
    ${h.link_to(_(u'Home'),h.url('/'))}
 
    %if c.group.parent_group:
 
        &raquo; ${h.link_to(c.group.parent_group.name,h.url('repos_group_home',group_name=c.group.parent_group.group_name))}
 
    %endif
 
    &raquo; "${c.group.name}" ${_('with')}
 
    </span>
 
</%def>
 

	
 
<%def name="page_nav()">
 
    ${self.menu('admin')}
 
</%def>
 
<%def name="main()">
rhodecode/templates/admin/repos_groups/repos_groups_edit.html
Show inline comments
 
@@ -60,22 +60,22 @@
 
                <div class="input">
 
                    <%include file="repos_group_edit_perms.html"/>
 
                </div>
 
            </div>
 
            <div class="field">
 
                <div class="label label-checkbox">
 
                    <label for="enable_locking">${_('Enable locking')}:</label>
 
                </div>
 
                <div class="checkboxes">
 
                    ${h.checkbox('enable_locking',value="True")}
 
                    <span class="help-block">${_('Enable lock-by-pulling on group. This option will be applied to all other groups and repositories inside')}</span>
 
                </div>
 
            </div>    
 
            </div>
 
            <div class="buttons">
 
              ${h.submit('save',_('Save'),class_="ui-btn large")}
 
              ${h.reset('reset',_('Reset'),class_="ui-btn large")}
 
            </div>
 
        </div>
 
    </div>
 
    ${h.end_form()}
 
</div>
 
</%def>
rhodecode/templates/admin/settings/settings.html
Show inline comments
 
@@ -145,25 +145,25 @@
 
                </div>
 
                <div class="checkboxes">
 
                    <div class="checkbox">
 
                        ${h.checkbox('rhodecode_stylify_metatags','True')}
 
                        <label for="rhodecode_stylify_metatags">${_('Stylify recognised metatags:')}</label>
 
                    </div>
 
                    <div style="padding-left: 20px;">
 
                        <ul> <!-- Fix style here -->
 
                            <li>[featured] <span class="metatag" tag="featured">featured</span></li>
 
                            <li>[stale] <span class="metatag" tag="stale">stale</span></li>
 
                            <li>[dead] <span class="metatag" tag="dead">dead</span></li>
 
                            <li>[lang =&gt; lang] <span class="metatag" tag="lang" >lang</span></li>
 
                            <li>[license =&gt; License] <span class="metatag" tag="license"><a href="http://www.opensource.org/licenses/License" >License</a></span></li>                            
 
                            <li>[license =&gt; License] <span class="metatag" tag="license"><a href="http://www.opensource.org/licenses/License" >License</a></span></li>
 
                            <li>[requires =&gt; Repo] <span class="metatag" tag="requires" >requires =&gt; <a href="#" >Repo</a></span></li>
 
                            <li>[recommends =&gt; Repo] <span class="metatag" tag="recommends" >recommends =&gt; <a href="#" >Repo</a></span></li>
 
                            <li>[see =&gt; URI] <span class="metatag" tag="see">see =&gt; <a href="#">URI</a> </span></li>
 
                        </ul>
 
                    </div>
 
                 </div>
 
             </div>
 

	
 
             <div class="buttons">
 
                 ${h.submit('save',_('Save settings'),class_="ui-btn large")}
 
                 ${h.reset('reset',_('Reset'),class_="ui-btn large")}
 
             </div>
 
@@ -228,27 +228,27 @@
 
                        ${h.checkbox('extensions_largefiles','True')}
 
                        <label for="extensions_hgsubversion">${_('largefiles extensions')}</label>
 
                    </div>
 
                    <div class="checkbox">
 
                        ${h.checkbox('extensions_hgsubversion','True')}
 
                        <label for="extensions_hgsubversion">${_('hgsubversion extensions')}</label>
 
                    </div>
 
                    <span class="help-block">${_('Requires hgsubversion library installed. Allows clonning from svn remote locations')}</span>
 
                    ##<div class="checkbox">
 
                    ##    ${h.checkbox('extensions_hggit','True')}
 
                    ##    <label for="extensions_hggit">${_('hg-git extensions')}</label>
 
                    ##</div>
 
                    ##<span class="help-block">${_('Requires hg-git library installed. Allows clonning from git remote locations')}</span>                    
 
                    ##<span class="help-block">${_('Requires hg-git library installed. Allows clonning from git remote locations')}</span>
 
                </div>
 
             </div>             
 
             </div>
 
            <div class="field">
 
                <div class="label">
 
                    <label for="paths_root_path">${_('Repositories location')}:</label>
 
                </div>
 
                <div class="input">
 
                    ${h.text('paths_root_path',size=30,readonly="readonly")}
 
					<span id="path_unlock" class="tooltip"
 
						title="${h.tooltip(_('This a crucial application setting. If you are really sure you need to change this, you must restart application in order to make this setting take effect. Click this label to unlock.'))}">
 
		                ${_('unlock')}</span>
 
                    <span class="help-block">${_('Location where repositories are stored. After changing this value a restart, and rescan is required')}</span>
 
                </div>
 
            </div>
rhodecode/templates/admin/users/user_edit.html
Show inline comments
 
@@ -143,42 +143,42 @@
 
        <!-- fields -->
 
        <div class="fields">
 
             <div class="field">
 
                <div class="label label-checkbox">
 
                    <label for="inherit_permissions">${_('Inherit default permissions')}:</label>
 
                </div>
 
                <div class="checkboxes">
 
                    ${h.checkbox('inherit_default_permissions',value=True)}
 
                </div>
 
                <span class="help-block">${h.literal(_('Select to inherit permissions from %s settings. '
 
                                             'With this selected below options does not have any action') % h.link_to('default', url('edit_permission', id='default')))}</span>
 
             </div>
 
             <div id="inherit_overlay" style="${'opacity:0.3' if c.user.inherit_default_permissions else ''}" >        
 
             <div id="inherit_overlay" style="${'opacity:0.3' if c.user.inherit_default_permissions else ''}" >
 
             <div class="field">
 
                <div class="label label-checkbox">
 
                    <label for="create_repo_perm">${_('Create repositories')}:</label>
 
                </div>
 
                <div class="checkboxes">
 
                    ${h.checkbox('create_repo_perm',value=True)}
 
                </div>
 
             </div>
 
             <div class="field">
 
                <div class="label label-checkbox">
 
                    <label for="fork_repo_perm">${_('Fork repositories')}:</label>
 
                </div>
 
                <div class="checkboxes">
 
                    ${h.checkbox('fork_repo_perm',value=True)}
 
                </div>
 
             </div>
 
             </div>             
 
             </div>
 
            <div class="buttons">
 
              ${h.submit('save',_('Save'),class_="ui-btn large")}
 
              ${h.reset('reset',_('Reset'),class_="ui-btn large")}
 
            </div>
 
        </div>
 
    </div>
 
    ${h.end_form()}
 

	
 
    ## permissions overview
 
    <div id="perms" class="table">
 
           %for section in sorted(c.perm_user.permissions.keys()):
 
              <div class="perms_section_head">${section.replace("_"," ").capitalize()}</div>
rhodecode/templates/admin/users_groups/users_group_edit.html
Show inline comments
 
@@ -103,43 +103,43 @@ ${h.end_form()}
 
    <div class="form">
 
        <!-- fields -->
 
        <div class="fields">
 
             <div class="field">
 
                <div class="label label-checkbox">
 
                    <label for="inherit_permissions">${_('Inherit default permissions')}:</label>
 
                </div>
 
                <div class="checkboxes">
 
                    ${h.checkbox('inherit_default_permissions',value=True)}
 
                </div>
 
                <span class="help-block">${h.literal(_('Select to inherit permissions from %s settings. '
 
                                             'With this selected below options does not have any action') % h.link_to('default', url('edit_permission', id='default')))}</span>
 
             </div>        
 
             </div>
 
             <div id="inherit_overlay" style="${'opacity:0.3' if c.users_group.inherit_default_permissions else ''}" >
 
             <div class="field">
 
                <div class="label label-checkbox">
 
                    <label for="create_repo_perm">${_('Create repositories')}:</label>
 
                </div>
 
                <div class="checkboxes">
 
                    ${h.checkbox('create_repo_perm',value=True)}
 
                </div>
 
             </div>
 
             <div class="field">
 
                <div class="label label-checkbox">
 
                    <label for="fork_repo_perm">${_('Fork repositories')}:</label>
 
                </div>
 
                <div class="checkboxes">
 
                    ${h.checkbox('fork_repo_perm',value=True)}
 
                </div>
 
             </div>
 
             </div>          
 
             </div>
 
            <div class="buttons">
 
              ${h.submit('save',_('Save'),class_="ui-btn large")}
 
              ${h.reset('reset',_('Reset'),class_="ui-btn large")}
 
            </div>
 
        </div>
 
    </div>
 
    ${h.end_form()}
 
</div>
 

	
 
<div class="box box-right">
 
    <!-- box / title -->
 
    <div class="title">
rhodecode/templates/email_templates/pull_request.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="main.html"/>
 
            
 
User <b>${pr_user_created}</b> opened pull request for repository 
 

	
 
User <b>${pr_user_created}</b> opened pull request for repository
 
${pr_repo_url} and wants you to review changes.
 

	
 
<div>title: ${pr_title}</div>
 
<div>description:</div>
 
<p>
 
${body}
 
</p>
 

	
 
<div>revisions for reviewing</div>
 
<ul>
 
%for r in pr_revisions:
 
    <li>${r}</li>
rhodecode/templates/email_templates/pull_request_comment.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="main.html"/>
 
            
 

	
 
User <b>${pr_comment_user}</b> commented on pull request #${pr_id} for
 
repository ${pr_target_repo}
 

	
 
<p>
 
${body}
 

	
 
%if status_change:
 
    <span>New status -> ${status_change}</span>
 
%endif
 
</p>
 

	
 
View this comment here: ${pr_comment_url}
rhodecode/templates/files/files.html
Show inline comments
 
@@ -38,73 +38,73 @@
 
</div>
 

	
 
<script type="text/javascript">
 
var CACHE = {};
 
var CACHE_EXPIRE = 60*1000; //cache for 60s
 
//used to construct links from the search list
 
var node_list_url = '${h.url("files_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}';
 
//send the nodelist request to this url
 
var url_base = '${h.url("files_nodelist_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}';
 

	
 
var ypjax_links = function(){
 
    YUE.on(YUQ('.ypjax-link'), 'click',function(e){
 
    	
 

	
 
    	//don't do ypjax on middle click
 
    	if(e.which == 2 || !History.enabled){ 
 
    	if(e.which == 2 || !History.enabled){
 
    		return true;
 
    	}
 
    	
 

	
 
        var el = e.currentTarget;
 
        var url = el.href;
 

	
 
        var _base_url = '${h.url("files_home",repo_name=c.repo_name,revision='',f_path='')}';
 
        _base_url = _base_url.replace('//','/')
 
        
 

	
 
        //extract rev and the f_path from url.
 
        parts = url.split(_base_url)
 
        if(parts.length != 2){
 
        	return false;
 
        }
 
        
 

	
 
        var parts2 = parts[1].split('/');
 
      	var rev = parts2.shift(); // pop the first element which is the revision
 
      	var f_path = parts2.join('/');
 
        
 

	
 
        var title = "${_('%s files') % c.repo_name}" + " - " + f_path;
 
        
 

	
 
        var _node_list_url = node_list_url.replace('__REV__',rev);
 
        var _url_base = url_base.replace('__REV__',rev).replace('__FPATH__', f_path);
 

	
 
        // Change our States and save some data for handling events
 
        var data = {url:url,title:title, url_base:_url_base,
 
                    node_list_url:_node_list_url};
 
        History.pushState(data, title, url);        
 
        
 
        History.pushState(data, title, url);
 

	
 
        //now we're sure that we can do ypjax things
 
        YUE.preventDefault(e)
 
        return false;
 
    });
 
}
 

	
 
var callbacks = function(State){
 
    ypjax_links();
 
    tooltip_activate();
 
    fileBrowserListeners(State.url, State.data.node_list_url, State.data.url_base);
 
    // Inform Google Analytics of the change
 
    if ( typeof window.pageTracker !== 'undefined' ) {
 
        window.pageTracker._trackPageview(State.url);
 
    }	
 
    }
 
}
 

	
 
YUE.onDOMReady(function(){ 
 
YUE.onDOMReady(function(){
 
    ypjax_links();
 
    var container = 'files_data';
 
    //Bind to StateChange Event
 
    History.Adapter.bind(window,'statechange',function(){
 
        var State = History.getState();
 
        cache_key = State.url;
 
        //check if we have this request in cache maybe ?
 
        var _cache_obj = CACHE[cache_key];
 
        var _cur_time = new Date().getTime();
 
        // get from cache if it's there and not yet expired !
 
        if(_cache_obj !== undefined && _cache_obj[0] > _cur_time){
 
            YUD.get(container).innerHTML=_cache_obj[1];
 
@@ -115,26 +115,26 @@ YUE.onDOMReady(function(){
 
        }
 
        else{
 
          ypjax(State.url,container,function(o){
 
          	//callbacks after ypjax call
 
          	callbacks(State);
 
          	if (o !== undefined){
 
          	  //store our request in cache
 
          	  var _expire_on = new Date().getTime()+CACHE_EXPIRE;
 
              CACHE[cache_key] = [_expire_on, o.responseText];
 
            }
 
          });
 
        }
 
    });    
 
 
 
    });
 

	
 
    // init the search filter
 
    var _State = {
 
       url: "${h.url.current()}",
 
       data: {
 
         node_list_url: node_list_url.replace('__REV__',"${c.changeset.raw_id}"),
 
         url_base: url_base.replace('__REV__',"${c.changeset.raw_id}").replace('__FPATH__', "${h.safe_unicode(c.file.path)}")
 
       }
 
    }
 
    fileBrowserListeners(_State.url, _State.data.node_list_url, _State.data.url_base);
 
});
 

	
 
</script>
rhodecode/templates/files/files_ypjax.html
Show inline comments
 
%if c.file:
 
    <h3 class="files_location">
 
        ${_('Location')}: ${h.files_breadcrumbs(c.repo_name,c.changeset.raw_id,c.file.path)}
 
        %if c.annotate:
 
        - ${_('annotation')}
 
        %endif
 
    </h3>
 
        %if c.file.is_dir():
 
            <%include file='files_browser.html'/>
 
        %else:
 
            <%include file='files_source.html'/>
 
        %endif        
 
        %endif
 
%else:
 
    <h2>
 
        <a href="#" onClick="javascript:parent.history.back();" target="main">${_('Go back')}</a>
 
        ${_('No files at given path')}: "${c.f_path or "/"}"
 
    </h2>
 
%endif
rhodecode/templates/pullrequests/pullrequest_show.html
Show inline comments
 
@@ -14,50 +14,50 @@
 

	
 
<%def name="main()">
 

	
 
<div class="box">
 
    <!-- box / title -->
 
    <div class="title">
 
        ${self.breadcrumbs()}
 
    </div>
 
        %if c.pull_request.is_closed():
 
        <div style="padding:10px; font-size:22px;width:100%;text-align: center; color:#88D882">${_('Closed %s') % (h.age(c.pull_request.updated_on))} ${_('with status %s') % h.changeset_status_lbl(c.current_changeset_status)}</div>
 
        %endif
 
    <h3>${_('Title')}: ${c.pull_request.title}</h3>
 
        
 

	
 
    <div class="form">
 
      <div id="summary" class="fields">
 
         <div class="field">
 
          <div class="label-summary">
 
              <label>${_('Status')}:</label>
 
          </div>
 
          <div class="input">
 
            <div class="changeset-status-container" style="float:none;clear:both">
 
            %if c.current_changeset_status:
 
              <div title="${_('Pull request status')}" class="changeset-status-lbl">[${h.changeset_status_lbl(c.current_changeset_status)}]</div>
 
              <div class="changeset-status-ico" style="padding:1px 4px"><img src="${h.url('/images/icons/flag_status_%s.png' % c.current_changeset_status)}" /></div>
 
            %endif
 
            </div>
 
          </div>
 
         </div>
 
         <div class="field">
 
          <div class="label-summary">
 
              <label>${_('Still not reviewed by')}:</label>
 
          </div>
 
          <div class="input">
 
            <div class="tooltip" title="${h.tooltip(','.join([x.username for x in c.pull_request_pending_reviewers]))}">${ungettext('%d reviewer', '%d reviewers',len(c.pull_request_pending_reviewers)) % len(c.pull_request_pending_reviewers)}</div>
 
          </div>
 
         </div>                
 
         </div>
 
      </div>
 
    </div>    
 
    </div>
 
    <div style="white-space:pre-wrap;padding:3px 3px 5px 20px">${h.literal(c.pull_request.description)}</div>
 
    <div style="padding:4px 4px 10px 20px">
 
      <div>${_('Created on')}: ${h.fmt_date(c.pull_request.created_on)}</div>
 
    </div>
 

	
 
    <div style="min-height:160px">
 
      ##DIFF
 
      <div class="table" style="float:left;clear:none">
 
          <div id="body" class="diffblock">
 
              <div style="white-space:pre-wrap;padding:5px">${_('Compare view')}</div>
 
          </div>
 
          <div id="changeset_compare_view_content">
rhodecode/templates/summary/summary.html
Show inline comments
 
@@ -99,25 +99,25 @@
 
				  %endif
 
			  </div>
 
			 </div>
 

	
 
			 <div class="field">
 
			  <div class="label-summary">
 
			      <label>${_('Description')}:</label>
 
			  </div>
 
              %if c.visual.stylify_metatags:
 
                <div class="input ${summary(c.show_stats)} desc">${h.urlify_text(h.desc_stylize(c.dbrepo.description))}</div>
 
              %else:
 
                <div class="input ${summary(c.show_stats)} desc">${h.urlify_text(c.dbrepo.description)}</div>
 
              %endif        
 
              %endif
 
			 </div>
 

	
 
			 <div class="field">
 
			  <div class="label-summary">
 
			      <label>${_('Contact')}:</label>
 
			  </div>
 
			  <div class="input ${summary(c.show_stats)}">
 
			  	<div class="gravatar">
 
			  		<img alt="gravatar" src="${h.gravatar_url(c.dbrepo.user.email)}"/>
 
			  	</div>
 
			  		${_('Username')}: ${c.dbrepo.user.username}<br/>
 
			  		${_('Name')}: ${c.dbrepo.user.name} ${c.dbrepo.user.lastname}<br/>
rhodecode/tests/models/test_permissions.py
Show inline comments
 
@@ -426,13 +426,12 @@ class TestPermissions(unittest.TestCase)
 
        user_model.grant_perm(self.u1, 'hg.fork.repository')
 

	
 
        # make sure inherit flag is turned off
 
        self.u1.inherit_default_permissions = False
 
        Session().commit()
 
        u1_auth = AuthUser(user_id=self.u1.user_id)
 
        # this user will have non inherited permissions from he's
 
        # explicitly set permissions
 
        self.assertEqual(u1_auth.permissions['global'],
 
                         set(['hg.create.repository', 'hg.fork.repository',
 
                              'hg.register.manual_activate',
 
                              'repository.read']))
 

	
0 comments (0 inline, 0 general)