comparison mercurial/patch.py @ 9029:0001e49f1c11

compat: use // for integer division
author Alejandro Santos <alejolp@alejolp.com>
date Sun, 05 Jul 2009 11:00:44 +0200
parents 5fe8dc75aa4a
children 3b76321aa0de
comparison
equal deleted inserted replaced
9028:bea567ae3ff6 9029:0001e49f1c11
1420 1420
1421 for filename, adds, removes in stats: 1421 for filename, adds, removes in stats:
1422 # If diffstat runs out of room it doesn't print anything, which 1422 # If diffstat runs out of room it doesn't print anything, which
1423 # isn't very useful, so always print at least one + or - if there 1423 # isn't very useful, so always print at least one + or - if there
1424 # were at least some changes 1424 # were at least some changes
1425 pluses = '+' * max(adds/factor, int(bool(adds))) 1425 pluses = '+' * max(adds // factor, int(bool(adds)))
1426 minuses = '-' * max(removes/factor, int(bool(removes))) 1426 minuses = '-' * max(removes // factor, int(bool(removes)))
1427 output.append(' %-*s | %*.d %s%s\n' % (maxname, filename, countwidth, 1427 output.append(' %-*s | %*.d %s%s\n' % (maxname, filename, countwidth,
1428 adds+removes, pluses, minuses)) 1428 adds+removes, pluses, minuses))
1429 1429
1430 if stats: 1430 if stats:
1431 output.append(' %d files changed, %d insertions(+), %d deletions(-)\n' 1431 output.append(' %d files changed, %d insertions(+), %d deletions(-)\n'