mercurial/patch.py
changeset 9639 5384a22ab698
parent 9598 a981ddb16b80
child 9642 7d17794f08a9
equal deleted inserted replaced
9638:8f8f9685ac5e 9639:5384a22ab698
  1405         return max(i * graphwidth // maxtotal, int(bool(i)))
  1405         return max(i * graphwidth // maxtotal, int(bool(i)))
  1406 
  1406 
  1407     for filename, adds, removes in stats:
  1407     for filename, adds, removes in stats:
  1408         pluses = '+' * scale(adds)
  1408         pluses = '+' * scale(adds)
  1409         minuses = '-' * scale(removes)
  1409         minuses = '-' * scale(removes)
  1410         output.append(' %-*s |  %*.d %s%s\n' % (maxname, filename, countwidth,
  1410         output.append(' %-*s |  %*s %s%s\n' % (maxname, filename, countwidth,
  1411                                                 adds+removes, pluses, minuses))
  1411                                                adds+removes, pluses, minuses))
  1412 
  1412 
  1413     if stats:
  1413     if stats:
  1414         output.append(_(' %d files changed, %d insertions(+), %d deletions(-)\n')
  1414         output.append(_(' %d files changed, %d insertions(+), %d deletions(-)\n')
  1415                       % (len(stats), totaladds, totalremoves))
  1415                       % (len(stats), totaladds, totalremoves))
  1416 
  1416