tests/readlink.py
author Pierre-Yves David <pierre-yves.david@fb.com>
Wed, 03 Feb 2016 15:12:01 +0000
changeset 28030 ca2a0a654f54
parent 25660 328739ea70c3
child 29175 7bcfb9090c86
permissions -rwxr-xr-x
update: warn about other topological head in pull and unbundle Other commands have a '--update' triggering a bare update. We now issue the message introduced into the previous changeset for these too.

#!/usr/bin/env python

import errno, os, sys

for f in sys.argv[1:]:
    try:
        print f, '->', os.readlink(f)
    except OSError as err:
        if err.errno != errno.EINVAL:
            raise
        print f, 'not a symlink'

sys.exit(0)