tests/readlink.py
author Eric Eisner <ede@mit.edu>
Mon, 20 Dec 2010 13:59:33 -0500
changeset 13181 413bef846806
parent 10282 08a0f04b56bd
child 25660 328739ea70c3
permissions -rwxr-xr-x
subrepo: fix subrelpath for git subrepos This patch conforms gitsubrepo code to the variable naming scheme of the other subrepo implementations. All user-facing path references should be relative to the root repository.

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