tests/readlink.py
author Patrick Mezard <pmezard@gmail.com>
Wed, 20 Apr 2011 23:15:18 +0200
branchstable
changeset 13968 82845434e974
parent 10282 08a0f04b56bd
child 25660 328739ea70c3
permissions -rwxr-xr-x
convert: make filemap prune useless branch closing revs (issue2774) A branch closing revision only applies if one of its parents belongs to the branch being closed. Otherwise the filemap can prune it too.

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