##// END OF EJS Templates
fixes to pidlock, to not raise unneded execptions...
marcink -
r509:b50e79b4 default
parent child Browse files
Show More
@@ -85,7 +85,7 b' def get_commits_stats(repo_name, ts_min_'
85 repo = MercurialRepository(repos_path + repo_name)
85 repo = MercurialRepository(repos_path + repo_name)
86
86
87 skip_date_limit = True
87 skip_date_limit = True
88 parse_limit = 350 #limit for single task changeset parsing
88 parse_limit = 350 #limit for single task changeset parsing optimal for
89 last_rev = 0
89 last_rev = 0
90 last_cs = None
90 last_cs = None
91 timegetter = itemgetter('time')
91 timegetter = itemgetter('time')
@@ -98,9 +98,12 b' def get_commits_stats(repo_name, ts_min_'
98 .filter(Statistics.repository == dbrepo).scalar()
98 .filter(Statistics.repository == dbrepo).scalar()
99 if cur_stats:
99 if cur_stats:
100 last_rev = cur_stats.stat_on_revision
100 last_rev = cur_stats.stat_on_revision
101 if not repo.revisions:
102 return True
101
103
102 if last_rev == repo.revisions[-1] and len(repo.revisions) > 1:
104 if last_rev == repo.revisions[-1] and len(repo.revisions) > 1:
103 #pass silently without any work
105 #pass silently without any work if we're not on first revision or current
106 #state of parsing revision(from db marker) is the last revision
104 return True
107 return True
105
108
106 if cur_stats:
109 if cur_stats:
@@ -74,6 +74,7 b' class DaemonLock(object):'
74 print "Lock File is there but the program is not running"
74 print "Lock File is there but the program is not running"
75 print "Removing lock file for the: %s" % running_pid
75 print "Removing lock file for the: %s" % running_pid
76 self.release()
76 self.release()
77 else:
77 raise
78 raise
78 else:
79 else:
79 print "You already have an instance of the program running"
80 print "You already have an instance of the program running"
@@ -143,17 +143,25 b''
143 <li>
143 <li>
144 ${h.link_to(_('branches'),h.url('branches_home',repo_name=c.repo_name),class_='branches childs')}
144 ${h.link_to(_('branches'),h.url('branches_home',repo_name=c.repo_name),class_='branches childs')}
145 <ul>
145 <ul>
146 %if c.repository_branches.values():
146 %for cnt,branch in enumerate(c.repository_branches.items()):
147 %for cnt,branch in enumerate(c.repository_branches.items()):
147 <li>${h.link_to('%s - %s' % (branch[0],branch[1]),h.url('files_home',repo_name=c.repo_name,revision=branch[1]))}</li>
148 <li>${h.link_to('%s - %s' % (branch[0],branch[1]),h.url('files_home',repo_name=c.repo_name,revision=branch[1]))}</li>
148 %endfor
149 %endfor
150 %else:
151 <li>${h.link_to(_('There are no branches yet'),'#')}</li>
152 %endif
149 </ul>
153 </ul>
150 </li>
154 </li>
151 <li>
155 <li>
152 ${h.link_to(_('tags'),h.url('tags_home',repo_name=c.repo_name),class_='tags childs')}
156 ${h.link_to(_('tags'),h.url('tags_home',repo_name=c.repo_name),class_='tags childs')}
153 <ul>
157 <ul>
158 %if c.repository_tags.values():
154 %for cnt,tag in enumerate(c.repository_tags.items()):
159 %for cnt,tag in enumerate(c.repository_tags.items()):
155 <li>${h.link_to('%s - %s' % (tag[0],tag[1]),h.url('files_home',repo_name=c.repo_name,revision=tag[1]))}</li>
160 <li>${h.link_to('%s - %s' % (tag[0],tag[1]),h.url('files_home',repo_name=c.repo_name,revision=tag[1]))}</li>
156 %endfor
161 %endfor
162 %else:
163 <li>${h.link_to(_('There are no tags yet'),'#')}</li>
164 %endif
157 </ul>
165 </ul>
158 </li>
166 </li>
159 </ul>
167 </ul>
@@ -64,10 +64,16 b''
64 h.url('summary_home',repo_name=repo['name']))}</td>
64 h.url('summary_home',repo_name=repo['name']))}</td>
65 <td title="${repo['description']}">${h.truncate(repo['description'],60)}</td>
65 <td title="${repo['description']}">${h.truncate(repo['description'],60)}</td>
66 <td>${h.age(repo['last_change'])}</td>
66 <td>${h.age(repo['last_change'])}</td>
67 <td>${h.link_to_if(repo['rev']>=0,'r%s:%s' % (repo['rev'],repo['tip']),
67 <td>
68 %if repo['rev']>=0:
69 ${h.link_to('r%s:%s' % (repo['rev'],repo['tip']),
68 h.url('changeset_home',repo_name=repo['name'],revision=repo['tip']),
70 h.url('changeset_home',repo_name=repo['name'],revision=repo['tip']),
69 class_="tooltip",
71 class_="tooltip",
70 tooltip_title=h.tooltip(repo['last_msg']))}</td>
72 tooltip_title=h.tooltip(repo['last_msg']))}
73 %else:
74 ${_('No changesets yet')}
75 %endif
76 </td>
71 <td title="${repo['contact']}">${h.person(repo['contact'])}</td>
77 <td title="${repo['contact']}">${h.person(repo['contact'])}</td>
72 <td>
78 <td>
73 <a title="${_('Subscribe to %s rss feed')%repo['name']}" class="rss_icon" href="${h.url('rss_feed_home',repo_name=repo['name'])}"></a>
79 <a title="${_('Subscribe to %s rss feed')%repo['name']}" class="rss_icon" href="${h.url('rss_feed_home',repo_name=repo['name'])}"></a>
@@ -59,5 +59,5 b' YAHOO.util.Event.addListener(YAHOO.util.'
59 YAHOO.util.Dom.setStyle(data_div,'opacity','1');}},null); return false;""")}
59 YAHOO.util.Dom.setStyle(data_div,'opacity','1');}},null); return false;""")}
60 </div>
60 </div>
61 %else:
61 %else:
62 ${_('There are no commits yet')}
62 ${_('There are no changes yet')}
63 %endif
63 %endif
@@ -136,7 +136,7 b' E.onDOMReady(function(e){'
136 if(no_data){
136 if(no_data){
137 var tr = document.createElement('tr');
137 var tr = document.createElement('tr');
138 var td1 = document.createElement('td');
138 var td1 = document.createElement('td');
139 td1.innerHTML = "${_('No data loaded yet...')}";
139 td1.innerHTML = "${_('No data loaded yet')}";
140 tr.appendChild(td1);
140 tr.appendChild(td1);
141 tbl.appendChild(tr);
141 tbl.appendChild(tr);
142 }
142 }
@@ -538,7 +538,9 b' E.onDOMReady(function(e){'
538 </div>
538 </div>
539 <div class="table">
539 <div class="table">
540 <%include file='../shortlog/shortlog_data.html'/>
540 <%include file='../shortlog/shortlog_data.html'/>
541 %if c.repo_changesets:
541 ${h.link_to(_('show more'),h.url('changelog_home',repo_name=c.repo_name))}
542 ${h.link_to(_('show more'),h.url('changelog_home',repo_name=c.repo_name))}
543 %endif
542 </div>
544 </div>
543 </div>
545 </div>
544 <div class="box">
546 <div class="box">
@@ -547,7 +549,9 b' E.onDOMReady(function(e){'
547 </div>
549 </div>
548 <div class="table">
550 <div class="table">
549 <%include file='../tags/tags_data.html'/>
551 <%include file='../tags/tags_data.html'/>
552 %if c.repo_changesets:
550 ${h.link_to(_('show more'),h.url('tags_home',repo_name=c.repo_name))}
553 ${h.link_to(_('show more'),h.url('tags_home',repo_name=c.repo_name))}
554 %endif
551 </div>
555 </div>
552 </div>
556 </div>
553 <div class="box">
557 <div class="box">
@@ -556,7 +560,9 b' E.onDOMReady(function(e){'
556 </div>
560 </div>
557 <div class="table">
561 <div class="table">
558 <%include file='../branches/branches_data.html'/>
562 <%include file='../branches/branches_data.html'/>
563 %if c.repo_changesets:
559 ${h.link_to(_('show more'),h.url('branches_home',repo_name=c.repo_name))}
564 ${h.link_to(_('show more'),h.url('branches_home',repo_name=c.repo_name))}
565 %endif
560 </div>
566 </div>
561 </div>
567 </div>
562
568
General Comments 0
You need to be logged in to leave comments. Login now