tests/readlink.py
author Yuya Nishihara <yuya@tcha.org>
Sun, 05 Jul 2015 12:50:09 +0900
changeset 25929 289149111d46
parent 25660 328739ea70c3
child 29175 7bcfb9090c86
permissions -rwxr-xr-x
revset: make balanced addsets by orset() without using _combinesets() As scmutil.revrange() was rewritten to not use _combinesets(), we no longer need _combinesets().

#!/usr/bin/env python

import errno, os, sys

for f in sys.argv[1:]:
    try:
        print f, '->', os.readlink(f)
    except OSError as err:
        if err.errno != errno.EINVAL:
            raise
        print f, 'not a symlink'

sys.exit(0)