tests/readlink.py
author Eric Eisner <ede@mit.edu>
Mon, 26 Apr 2010 15:58:36 -0400
changeset 11047 c7dbd6c4877a
parent 10282 08a0f04b56bd
child 25660 328739ea70c3
permissions -rwxr-xr-x
tags: return tags in sorted order This makes log and summary have less arbitrary tag ordering and also groups similar tags together, such as the mq tags.

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