tests/readlink.py
author Sune Foldager <cryo@cyanite.org>
Thu, 05 May 2011 18:05:24 +0200
changeset 14208 d62d597b8974
parent 10282 08a0f04b56bd
child 25660 328739ea70c3
permissions -rwxr-xr-x
revlog: compute correct deltaparent in the deltaparent function It now returns nullrev for chain base revisions, since they are conceptually deltas against nullrev. The revdiff function was updated accordingly.

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