convert: add support for deterministic progress bar on scanning phase
This makes it possible to estimate how long the "scanning source"
phase will take, if the specified source repo type supports a quick
"how many changes" check.
#!/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)