Changeset - 761e00380370
[Not reviewed]
beta
0 5 0
Marcin Kuzminski - 13 years ago 2012-06-06 23:33:27
marcin@python-works.com
whitespace cleanup
5 files changed with 9 insertions and 10 deletions:
0 comments (0 inline, 0 general)
rhodecode/config/pre_receive_tmpl.py
Show inline comments
 
@@ -7,23 +7,23 @@ try:
 
    from rhodecode.lib.hooks import handle_git_post_receive
 
except ImportError:
 
    rhodecode = None
 

	
 

	
 
def main():
 
    if rhodecode is None:
 
        # exit with success if we cannot import rhodecode !!
 
        # this allows simply push to this repo even without
 
        # rhodecode
 
        sys.exit(0)
 

	
 
    repo_path = os.path.abspath('.')    
 
    repo_path = os.path.abspath('.')
 
    push_data = sys.stdin.read().strip().split(' ')
 
    # os.environ is modified here by a subprocess call that
 
    # runs git and later git executes this hook.
 
    # Environ get's some additional info from rhodecode system
 
    # like IP or username from basic-auth
 
    handle_git_post_receive(repo_path, push_data, os.environ)
 
    sys.exit(0)
 

	
 
if __name__ == '__main__':
 
    main()
 
\ No newline at end of file
 
    main()
rhodecode/controllers/admin/settings.py
Show inline comments
 
@@ -187,31 +187,31 @@ class SettingsController(BaseController)
 
                    hgsettings2.ui_value = form_result['paths_root_path']
 

	
 
                    #HOOKS
 
                    hgsettings3 = self.sa.query(RhodeCodeUi)\
 
                    .filter(RhodeCodeUi.ui_key == RhodeCodeUi.HOOK_UPDATE)\
 
                    .one()
 
                    hgsettings3.ui_active = bool(form_result[_f('hooks_%s' %
 
                                                 RhodeCodeUi.HOOK_UPDATE)])
 

	
 
                    hgsettings4 = self.sa.query(RhodeCodeUi)\
 
                    .filter(RhodeCodeUi.ui_key == RhodeCodeUi.HOOK_REPO_SIZE)\
 
                    .one()
 
                    hgsettings4.ui_active = bool(form_result[_f('hooks_%s' % 
 
                    hgsettings4.ui_active = bool(form_result[_f('hooks_%s' %
 
                                                 RhodeCodeUi.HOOK_REPO_SIZE)])
 

	
 
                    hgsettings5 = self.sa.query(RhodeCodeUi)\
 
                    .filter(RhodeCodeUi.ui_key == RhodeCodeUi.HOOK_PUSH)\
 
                    .one()
 
                    hgsettings5.ui_active = bool(form_result[_f('hooks_%s' % 
 
                    hgsettings5.ui_active = bool(form_result[_f('hooks_%s' %
 
                                                 RhodeCodeUi.HOOK_PUSH)])
 

	
 
                    hgsettings6 = self.sa.query(RhodeCodeUi)\
 
                    .filter(RhodeCodeUi.ui_key == RhodeCodeUi.HOOK_PULL)\
 
                    .one()
 
                    hgsettings6.ui_active = bool(form_result[_f('hooks_%s' %
 
                                                 RhodeCodeUi.HOOK_PULL)])
 

	
 
                    self.sa.add(hgsettings1)
 
                    self.sa.add(hgsettings2)
 
                    self.sa.add(hgsettings3)
 
                    self.sa.add(hgsettings4)
rhodecode/lib/hooks.py
Show inline comments
 
@@ -190,28 +190,27 @@ def log_create_repository(repository_dic
 
        kw = {}
 
        kw.update(repository_dict)
 
        kw.update({'created_by': created_by})
 
        kw.update(kwargs)
 
        return callback(**kw)
 

	
 
    return 0
 

	
 

	
 
def handle_git_post_receive(repo_path, revs, env):
 
    """
 
    A really hacky method that is runned by git post-receive hook and logs
 
    an push action together with pushed revisions. It's runned by subprocess
 
    thus needs all info to be able to create a temp pylons enviroment, connect
 
    to database and run the logging code. Hacky as sh**t but works. ps.
 
    GIT SUCKS
 
    an push action together with pushed revisions. It's executed by subprocess
 
    thus needs all info to be able to create a on the fly pylons enviroment,
 
    connect to database and run the logging code. Hacky as sh*t but works.
 

	
 
    :param repo_path:
 
    :type repo_path:
 
    :param revs:
 
    :type revs:
 
    :param env:
 
    :type env:
 
    """
 
    from paste.deploy import appconfig
 
    from sqlalchemy import engine_from_config
 
    from rhodecode.config.environment import load_environment
 
    from rhodecode.model import init_model
rhodecode/templates/journal/journal.html
Show inline comments
 
@@ -15,25 +15,25 @@
 
	    <!-- box / title -->
 
	    <div class="title">
 
	        <h5>${_('Journal')}</h5>
 
             <ul class="links">
 
               <li>
 
                 <span><a id="refresh" href="${h.url('journal')}"><img class="icon" title="${_('Refresh')}" alt="${_('Refresh')}" src="${h.url('/images/icons/arrow_refresh.png')}"/></a></span>
 
               </li>
 
               <li>
 
                 <span><a href="${h.url('journal_rss')}"><img class="icon" title="${_('RSS feed')}" alt="${_('RSS feed')}" src="${h.url('/images/icons/atom.png')}"/></a></span>
 
               </li>
 
               <li>
 
                 <span><a href="${h.url('journal_atom')}"><img class="icon" title="${_('ATOM feed')}" alt="${_('ATOM feed')}" src="${h.url('/images/icons/rss_16.png')}"/></a></span>
 
               </li>                         
 
               </li>
 
             </ul>
 
	    </div>
 
	    <div id="journal">${c.journal_data}</div>
 
    </div>
 
    <div class="box box-right">
 
        <!-- box / title -->
 
        <div class="title">
 
            <h5>
 
            <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}"/>
 
            <a id="show_my" class="link-white" href="#my">${_('My repos')}</a> / <a id="show_watched" class="link-white" href="#watched">${_('Watched')}</a>
 
            </h5>
 
             %if h.HasPermissionAny('hg.admin','hg.create.repository')():
rhodecode/templates/journal/public_journal.html
Show inline comments
 
@@ -12,25 +12,25 @@
 
<%def name="main()">
 

	
 
    <div class="box">
 
	    <!-- box / title -->
 
	    <div class="title">
 
	        <h5>${_('Public Journal')}</h5>
 
                <ul class="links">
 
<li>
 
                 <span><a href="${h.url('public_journal_rss')}"><img class="icon" title="${_('RSS feed')}" alt="${_('RSS feed')}" src="${h.url('/images/icons/atom.png')}"/></a></span>
 
               </li>
 
               <li>
 
                 <span><a href="${h.url('public_journal_atom')}"><img class="icon" title="${_('ATOM feed')}" alt="${_('ATOM feed')}" src="${h.url('/images/icons/rss_16.png')}"/></a></span>
 
               </li>   
 
               </li>
 
                </ul>
 

	
 
	    </div>
 
		<script type="text/javascript">
 
		function show_more_event(){
 
		YUE.on(YUD.getElementsByClassName('show_more'),'click',function(e){
 
		    var el = e.target;
 
		    YUD.setStyle(YUD.get(el.id.substring(1)),'display','');
 
		    YUD.setStyle(el.parentNode,'display','none');
 
		});
 
		}
 
		</script>
0 comments (0 inline, 0 general)