def _relative_depth(common, path):
    n = 0
    while 1:
        dirname = os.path.dirname(path)
        if dirname == path:
            raise AssertionError("dirname of %s is the same" % dirname)
        if dirname == common:
            break
        n += 1
        path = dirname
    return n
Return number of dirs separating ``path`` from ancestor, ``common``.
dataset/ETHPy150Open moraes/tipfy/manage/easy_install.py/_relative_depth