tests/readlink.py
author Thomas Arendsen Hein <thomas@intevation.de>
Wed, 04 Apr 2012 11:18:42 +0200
branchstable
changeset 16355 cb1475e7e5a2
parent 10282 08a0f04b56bd
child 25660 328739ea70c3
permissions -rwxr-xr-x
test-merge-types: allow different output with existing hgmerge (issue3346) Because hgmerge was meant to be adjusted to personal needs, there may be many remaining copies in people's $PATH.

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