tests/readlink.py
author Augie Fackler <raf@durin42.com>
Mon, 26 May 2014 11:53:12 -0400
changeset 22411 c497e39d81a3
parent 10282 08a0f04b56bd
child 25660 328739ea70c3
permissions -rwxr-xr-x
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)