tests/readlink.py
author Pierre-Yves David <pierre-yves.david@logilab.fr>
Wed, 26 Sep 2012 18:13:00 +0200
changeset 17665 b65533958b85
parent 10282 08a0f04b56bd
child 25660 328739ea70c3
permissions -rwxr-xr-x
histedit: rename `tip` to `topmost` I expected `tip` to be repo's tip when it was the rewritten set tip. I rename the variable to the less ambiguous `topmost`.

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