@staticmethod
def __b(value):
    """
        Because Hg Lib is setup to only work with binary encoded strings(8 bit ASCII) and is TERRIBLE at sanitizing
        its inputs, this function is necessary to do that for it.  This also makes unicode out of the question for
        HG repos.
        :param value: A value to be binarized.
        :return:
        """
    if isinstance(value, bytes):
        return value
    return str(value).encode('latin-1')
