tests/readlink.py
author Matt Mackall <mpm@selenic.com>
Wed, 24 Jul 2013 23:51:40 -0500
branchstable
changeset 19476 4fed15d4c5aa
parent 10282 08a0f04b56bd
child 25660 328739ea70c3
permissions -rwxr-xr-x
commands: add checks for unfinished operations (issue3955) commands checked: backout bisect commit graft import

#!/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)