view tests/readlink.py @ 27136:29b08ca680b0

test-merge-changedelete.t: print out debugmergestate We're going to use this to verify the merge state in upcoming patches.
author Siddharth Agarwal <sid0@fb.com>
date Wed, 25 Nov 2015 14:26:46 -0800
parents 328739ea70c3
children 7bcfb9090c86
line wrap: on
line source

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