Download:
child 12:10e706a1f650
parent 10:0dcbc688ad6b
11:255526e91799
Anton Shestakov <engored@ya.ru>, Tue, 05 May 2015 23:52:12 +0800
viewer: use str.format() more

1 файлов изменено, 2 вставок(+), 2 удалений(-) [+]
viewer.py file | annotate | diff | comparison | revisions
--- a/viewer.py Tue May 05 23:28:22 2015 +0800
+++ b/viewer.py Tue May 05 23:52:12 2015 +0800
@@ -52,7 +52,7 @@
rev = self.get_argument('rev', 'tip')
revcount = 120
- return getinfo('first(%s:0, %d)' % (rev, revcount))
+ return getinfo('first({}:0, {})'.format(rev, revcount))
def getresults(self, changesets):
results = {}
@@ -110,7 +110,7 @@
revcount = 120
regex = re.compile(r'^[-\\|/+ ]+([0-9a-f]{40})$')
template = '{rev}:{node|short} {tags} {date|isodate} {author|user} {desc|firstline|strip}\n {node}\n\n'
- revset = 'first(%s:0, %d)' % (rev, revcount)
+ revset = 'first({}:0, {})'.format(rev, revcount)
cmd = [HG, 'log', '-R', TESTHGREPO, '-G', '-T', template, '-r', revset]
graph = subprocess.Popen(cmd, stdout=subprocess.PIPE)
while graph.poll() is None: