view tests/readlink.py @ 11211:e43c23d189a5

push: add --new-branch option to allow intial push of new branches Compare this to --force which allows anything to be pushed. With --new-branch, only changesets to named branches not present on the and changesets not introducing additional heads on existing branches are allowed. Developed by Henrik Stuart <henrik.stuart@edlund.dk> Sune Foldager <cryo@cyanite.org>
author Sune Foldager <cryo@cyanite.org>
date Fri, 21 May 2010 15:22:29 +0200
parents 08a0f04b56bd
children 328739ea70c3
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, err:
        if err.errno != errno.EINVAL:
            raise
        print f, 'not a symlink'

sys.exit(0)