tests/readlink.py
author Bruce Cran <bruce.cran@gmail.com>
Mon, 05 Oct 2015 10:43:16 -0600
branchstable
changeset 26503 5a84a453b503
parent 25660 328739ea70c3
child 29175 7bcfb9090c86
permissions -rwxr-xr-x
notify: fix fromauthor setting for 'incoming' hook type (issue4194) Set the author field in notification emails for the 'incoming' hook type in addition to 'changegroup' and 'outgoing' types.

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