tests/readlink.py
author Eric Roshan Eisner <ede@alum.mit.edu>
Fri, 11 Nov 2011 11:11:11 +1111
branchstable
changeset 15531 0810ccc51f0a
parent 10282 08a0f04b56bd
child 25660 328739ea70c3
permissions -rwxr-xr-x
subrepo: fix git status false positive (issue3109) It turns out there's a separate command to force git to look at file contents if the stat has changed.

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