tests/readlink.py
author Martijn Pieters <mjpieters@fb.com>
Wed, 20 Apr 2016 18:26:29 +0100
branchstable
changeset 28998 f303b569134c
parent 25660 328739ea70c3
child 29175 7bcfb9090c86
permissions -rwxr-xr-x
graphmod: fix seen state handling for > 2 parents (issue5174) When there are more than 2 parents for a given node (in a sparse graph), extra dummy nodes are inserted to transition the lines more gradually. However, since the seen state was not updated when yielding the extra nodes, the wrong graph styles were being applied to the nodes.

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