tests/readlink.py
author Mads Kiilerich <madski@unity3d.com>
Thu, 13 Dec 2012 19:19:06 +0100
branchstable
changeset 18139 03faf12fbee7
parent 10282 08a0f04b56bd
child 25660 328739ea70c3
permissions -rwxr-xr-x
largefiles status: update lfdirstate with result from cleanliness check Problem: 'hg status' kept checking largefiles with an unknown state until some other command wrote the updated dirstate. Solution: Add missing lfdirstate.write().

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