tests/readlink.py
author Siddharth Agarwal <sid0@fb.com>
Wed, 01 Apr 2015 00:38:56 -0700
changeset 24605 98744856b7d3
parent 10282 08a0f04b56bd
child 25660 328739ea70c3
permissions -rwxr-xr-x
util: add normcase spec and fallback These will be used in upcoming patches to efficiently create a dirstate foldmap.

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