tests/readlink.py
author Martin von Zweigbergk <martinvonz@gmail.com>
Mon, 29 Sep 2014 23:23:44 -0700
changeset 22581 c5ece02fb211
parent 10282 08a0f04b56bd
child 25660 328739ea70c3
permissions -rwxr-xr-x
shelve: avoid writing file that is never read from The contents of the .files file has not been used since 1d7a36ff2615 (shelve: use rebase instead of merge (issue4068), 2013-10-23), so stop writing it. Where we currently use the presence of the file as a check for a valid shelve name, switch to checking for the .patch file.

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