Download:
child 13:dce6d8966d49
parent 11:255526e91799
12:10e706a1f650
Anton Shestakov <engored@ya.ru>, Tue, 05 May 2015 23:53:29 +0800
viewer: second time in .tsv view

1 файлов изменено, 11 вставок(+), 14 удалений(-) [+]
viewer.py file | annotate | diff | comparison | revisions
--- a/viewer.py Tue May 05 23:52:12 2015 +0800
+++ b/viewer.py Tue May 05 23:53:29 2015 +0800
@@ -84,23 +84,19 @@
return results
- def getdata(self):
- changesets = self.getchangesets()
- results = self.getresults(changesets)
- return changesets, results
-
def results_tsv(self):
self.set_header('Content-Type', 'text/plain; charset=UTF-8')
- changesets, results = self.getdata()
- self.write('rev\tnode\t')
- self.write('\t'.join(MARKS.keys()))
+ changesets = self.getchangesets()
+ results = self.getresults(changesets)
+ self.write('rev\tnode')
+ for mark in MARKS:
+ self.write('\t{0} (without cache)\t{0} (with cache)'.format(mark))
self.write('\n')
for cset in changesets:
- self.write('%(rev)s\t%(node)s\t' % cset)
- self.write('\t'.join(
- str(results.get(cset['node'], {}).get(mark, ('',))[0])
- for mark in MARKS
- ))
+ self.write('{rev}\t{node}'.format(**cset))
+ for mark in MARKS:
+ marks = results.get(cset['node'], {}).get(mark, ('', '', ''))
+ self.write('\t{0}\t{2}'.format(*marks))
self.write('\n')
self.finish()
@@ -128,7 +124,8 @@
self.finish()
def results_html(self):
- changesets, results = self.getdata()
+ changesets = self.getchangesets()
+ results = self.getresults(changesets)
self.render('results.html', changesets=changesets, marks=MARKS, results=results)