tests/readlink.py
author Christian Delahousse <cdelahousse@fb.com>
Tue, 10 Nov 2015 14:29:13 -0800
changeset 26940 91786f20db83
parent 25660 328739ea70c3
child 29175 7bcfb9090c86
permissions -rwxr-xr-x
git-subrepos: revert respects specified location to save .orig files This patch makes revert in git subrepos save .orig files where the user wants them by using the cmdutil.origpath function.

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