tests/readlink.py
author Idan Kamara <idankk86@gmail.com>
Wed, 15 Feb 2012 23:49:15 +0200
branchstable
changeset 16113 3f75fb837638
parent 10282 08a0f04b56bd
child 25660 328739ea70c3
permissions -rwxr-xr-x
localrepo: reset _phasesdirty flag after writing

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