--- a/viewer.py Tue May 05 23:28:22 2015 +0800
+++ b/viewer.py Tue May 05 23:52:12 2015 +0800
rev = self.get_argument('rev', 'tip')
- return getinfo('first(%s:0, %d)' % (rev, revcount))
+ return getinfo('first({}:0, {})'.format(rev, revcount))
def getresults(self, changesets):
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: