view tests/readlink.py @ 30604:b654112a0119

convert: return commit objects for revisions in the revmap Source revision data that exists in the revmap are ignored when pulling data from Perforce as we consider them already imported. In case where the `convertcmd.convert` algorithm requests a commit object for such a revision we are creating it. This is usually the case for parent of the first imported revision.
author David Soria Parra <davidsp@fb.com>
date Wed, 14 Dec 2016 12:07:23 -0800
parents 6a98f9408a50
children c102b704edb5
line wrap: on
line source

#!/usr/bin/env python

from __future__ import absolute_import, print_function

import errno
import os
import 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, '->', f, 'not a symlink')

sys.exit(0)