view tests/readlink.py @ 21648:c26a11cdafeb

bundle2: use non-publishing repo in test If we are going to test usage of bundle for phases exchange, we need some phase movements to be exchanged.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Tue, 27 May 2014 13:40:12 -0700
parents 08a0f04b56bd
children 328739ea70c3
line wrap: on
line source

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