view tests/readlink.py @ 10689:3b3bf520b428 stable

mq: don't mention qinit as a "common task" Without -c, it is a no-op (the queue is implicitly initialized by all relevant commands if needed), and queue repositories with -c are an advanced usage of mq, and not otherwise required.
author Cédric Duval <cedricduval@free.fr>
date Sun, 14 Mar 2010 19:17:06 +0100
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)