def is_versioned(target):
    """Check if file/folder is versioned."""

    assert exists(target), "%s does not exist!" % target
    versioned = False
    try:
        results = log(target, 1)
        if results is not None:
            if results.find("logentry") is not None:
                versioned = True
    except Exception:
        pass

    return versioned
dataset/ETHPy150Open facelessuser/EasyDiff/lib/hg.py/is_versioned/original