diffstat: scale adds/removes proportionally to graph width
The previous method of scaling had a tendency to include graph lines that
went past the output width when the file with the most changes had a very
large number of changes.
#!/usr/bin/env python
import errno, os, sys
for f in sys.argv[1:]:
try:
print f, '->', os.readlink(f)
except OSError, err:
if err.errno != errno.EINVAL: raise
print f, 'not a symlink'
sys.exit(0)