comparison mercurial/ui.py @ 34271:a254c669b475

ui: fix progress debug log format strings to work on Python 3
author Augie Fackler <augie@google.com>
date Mon, 18 Sep 2017 13:37:00 -0400
parents 0a2fd3bfc704
children f61f5af5ed31
comparison
equal deleted inserted replaced
34270:3db2365d43e4 34271:a254c669b475
1519 if item: 1519 if item:
1520 item = ' ' + item 1520 item = ' ' + item
1521 1521
1522 if total: 1522 if total:
1523 pct = 100.0 * pos / total 1523 pct = 100.0 * pos / total
1524 self.debug('%s:%s %s/%s%s (%4.2f%%)\n' 1524 self.debug('%s:%s %d/%d%s (%4.2f%%)\n'
1525 % (topic, item, pos, total, unit, pct)) 1525 % (topic, item, pos, total, unit, pct))
1526 else: 1526 else:
1527 self.debug('%s:%s %s%s\n' % (topic, item, pos, unit)) 1527 self.debug('%s:%s %d%s\n' % (topic, item, pos, unit))
1528 1528
1529 def log(self, service, *msg, **opts): 1529 def log(self, service, *msg, **opts):
1530 '''hook for logging facility extensions 1530 '''hook for logging facility extensions
1531 1531
1532 service should be a readily-identifiable subsystem, which will 1532 service should be a readily-identifiable subsystem, which will