def mask2long(mask):
    assert isinstance(mask, (int, long)) and mask >= 0 and mask <= 32
    return -(1 << (32 - mask)) 


# deprecated
Performs in-memory commit (doesn't check workdir in any way) and
dataset/ETHPy150Open securitykiss-com/rfw/rfw/iputil.py/mask2long--crossover with--dataset/ETHPy150Open codeinn/vcs/vcs/backends/git/inmemory.py/GitInMemoryChangeset.commit