Changeset - b50e79b4257a
[Not reviewed]
default
0 6 0
Marcin Kuzminski - 15 years ago 2010-09-28 21:53:52
marcin@python-works.com
fixes to pidlock, to not raise unneded execptions
few fixes in templating for empty repository to not show some labels, fixed tag/branch switcher
6 files changed with 35 insertions and 11 deletions:
0 comments (0 inline, 0 general)
pylons_app/lib/celerylib/tasks.py
Show inline comments
 
@@ -85,7 +85,7 @@ def get_commits_stats(repo_name, ts_min_
 
    repo = MercurialRepository(repos_path + repo_name)
 

	
 
    skip_date_limit = True
 
    parse_limit = 350 #limit for single task changeset parsing
 
    parse_limit = 350 #limit for single task changeset parsing optimal for
 
    last_rev = 0
 
    last_cs = None
 
    timegetter = itemgetter('time')
 
@@ -98,9 +98,12 @@ def get_commits_stats(repo_name, ts_min_
 
        .filter(Statistics.repository == dbrepo).scalar()
 
    if cur_stats:
 
        last_rev = cur_stats.stat_on_revision
 
    if not repo.revisions:
 
        return True
 
    
 
    if last_rev == repo.revisions[-1] and len(repo.revisions) > 1:
 
        #pass silently without any work
 
        #pass silently without any work if we're not on first revision or current
 
        #state of parsing revision(from db marker) is the last revision
 
        return True
 
    
 
    if cur_stats:
pylons_app/lib/pidlock.py
Show inline comments
 
@@ -74,7 +74,8 @@ class DaemonLock(object):
 
                        print "Lock File is there but the program is not running"
 
                        print "Removing lock file for the: %s" % running_pid                        
 
                        self.release()
 
                    raise
 
                    else:
 
                        raise
 
                else:
 
                    print "You already have an instance of the program running"
 
                    print "It is running as process %s" % running_pid                    
pylons_app/templates/base/base.html
Show inline comments
 
@@ -143,17 +143,25 @@
 
                        <li>
 
                            ${h.link_to(_('branches'),h.url('branches_home',repo_name=c.repo_name),class_='branches childs')}
 
                            <ul>
 
                            %if c.repository_branches.values():
 
						        %for cnt,branch in enumerate(c.repository_branches.items()):
 
						            <li>${h.link_to('%s - %s' % (branch[0],branch[1]),h.url('files_home',repo_name=c.repo_name,revision=branch[1]))}</li>
 
						        %endfor
 
						    %else:
 
						    	<li>${h.link_to(_('There are no branches yet'),'#')}</li>
 
						    %endif
 
                            </ul>                        
 
                        </li>
 
                        <li>
 
                            ${h.link_to(_('tags'),h.url('tags_home',repo_name=c.repo_name),class_='tags childs')}
 
                            <ul>
 
                            %if c.repository_tags.values():
 
                                %for cnt,tag in enumerate(c.repository_tags.items()):
 
                                 <li>${h.link_to('%s - %s' % (tag[0],tag[1]),h.url('files_home',repo_name=c.repo_name,revision=tag[1]))}</li>
 
                                %endfor
 
                            %else:
 
                            	<li>${h.link_to(_('There are no tags yet'),'#')}</li>
 
                            %endif
 
                            </ul>                        
 
                        </li>                        
 
                    </ul>
pylons_app/templates/index.html
Show inline comments
 
@@ -64,10 +64,16 @@
 
					                h.url('summary_home',repo_name=repo['name']))}</td>
 
					            <td title="${repo['description']}">${h.truncate(repo['description'],60)}</td>
 
					            <td>${h.age(repo['last_change'])}</td>
 
					            <td>${h.link_to_if(repo['rev']>=0,'r%s:%s' % (repo['rev'],repo['tip']),
 
					            <td>
 
					            	%if repo['rev']>=0:
 
					            	${h.link_to('r%s:%s' % (repo['rev'],repo['tip']),
 
					                h.url('changeset_home',repo_name=repo['name'],revision=repo['tip']),
 
					                class_="tooltip",
 
					                tooltip_title=h.tooltip(repo['last_msg']))}</td>
 
					                tooltip_title=h.tooltip(repo['last_msg']))}
 
					            	%else:
 
					            		${_('No changesets yet')}
 
					            	%endif    
 
					            </td>
 
					            <td title="${repo['contact']}">${h.person(repo['contact'])}</td>
 
					            <td>
 
					                <a title="${_('Subscribe to %s rss feed')%repo['name']}" class="rss_icon"  href="${h.url('rss_feed_home',repo_name=repo['name'])}"></a>
pylons_app/templates/shortlog/shortlog_data.html
Show inline comments
 
@@ -38,7 +38,7 @@
 
		|
 
		${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}
 
		</td>
 
	</tr>	
 
	</tr>
 
%endfor
 

	
 
</table>
 
@@ -59,5 +59,5 @@ YAHOO.util.Event.addListener(YAHOO.util.
 
YAHOO.util.Dom.setStyle(data_div,'opacity','1');}},null); return false;""")}
 
</div>
 
%else:
 
    ${_('There are no commits yet')}
 
    ${_('There are no changes yet')}
 
%endif
pylons_app/templates/summary/summary.html
Show inline comments
 
@@ -136,7 +136,7 @@ E.onDOMReady(function(e){
 
			  		if(no_data){
 
			  			var tr = document.createElement('tr');
 
			  			var td1 = document.createElement('td');
 
			  			td1.innerHTML = "${_('No data loaded yet...')}";
 
			  			td1.innerHTML = "${_('No data loaded yet')}";
 
			  			tr.appendChild(td1);
 
			  			tbl.appendChild(tr);
 
					}
 
@@ -538,7 +538,9 @@ E.onDOMReady(function(e){
 
    </div>    
 
    <div class="table">
 
        <%include file='../shortlog/shortlog_data.html'/>
 
        ${h.link_to(_('show more'),h.url('changelog_home',repo_name=c.repo_name))}
 
        %if c.repo_changesets:
 
        	${h.link_to(_('show more'),h.url('changelog_home',repo_name=c.repo_name))}
 
        %endif
 
    </div>
 
</div>
 
<div class="box">    
 
@@ -547,7 +549,9 @@ E.onDOMReady(function(e){
 
    </div>    
 
    <div class="table">
 
        <%include file='../tags/tags_data.html'/>
 
        ${h.link_to(_('show more'),h.url('tags_home',repo_name=c.repo_name))}
 
        %if c.repo_changesets:
 
        	${h.link_to(_('show more'),h.url('tags_home',repo_name=c.repo_name))}
 
        %endif
 
    </div>
 
</div>
 
<div class="box">
 
@@ -556,7 +560,9 @@ E.onDOMReady(function(e){
 
    </div>    
 
    <div class="table">
 
        <%include file='../branches/branches_data.html'/>
 
        ${h.link_to(_('show more'),h.url('branches_home',repo_name=c.repo_name))}
 
        %if c.repo_changesets:
 
        	${h.link_to(_('show more'),h.url('branches_home',repo_name=c.repo_name))}
 
        %endif
 
    </div>      
 
</div> 
 

	
0 comments (0 inline, 0 general)