tests/readlink.py
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
Fri, 20 Aug 2010 00:17:50 +0200
changeset 11995 ff84cd2bdfaf
parent 10282 08a0f04b56bd
child 25660 328739ea70c3
permissions -rwxr-xr-x
revlog.revision(): minor cleanup Rename some variables, making the name more obvious (in particular "cache" was actually two different variable. Move code around, moving the index preloading before the deltachain computation, without that index preloading was useless (everything was read in deltachain).

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