tests/readlink.py
author Durham Goode <durham@fb.com>
Wed, 13 Feb 2013 12:51:30 -0800
changeset 18691 4f485bd68f1d
parent 10282 08a0f04b56bd
child 25660 328739ea70c3
permissions -rwxr-xr-x
blackbox: do not translate the log messages User 'timeless' in irc mentioned that having the blackbox be translated would result in logs that: - may be mixed language, if multiple users use the same repo - are not google searchable (since searching for english gives more results) - might not be readable by an admin if the employee is using hg in his native language And therefore we should log everything in english.

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