tests/readlink.py
author Martin Geisler <mg@aragost.com>
Wed, 06 Apr 2011 16:21:12 +0200
changeset 13899 a7cd0eee396b
parent 10282 08a0f04b56bd
child 25660 328739ea70c3
permissions -rwxr-xr-x
commit: note when files are missing Before, you could experience the following strange interaction: $ hg commit nothing changed $ hg merge abort: outstanding uncommitted changes which confused at least one user in #mercurial.

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