def pull(path, use_sudo=False, user=None):

    if not path:
        raise ValueError("Path to the working copy is needed to pull from a "
                         "remote repository.")

    cmd = 'hg pull'

    with cd(path):
        if use_sudo and user is None:
            run_as_root(cmd)
        elif use_sudo:
            sudo(cmd, user=user)
        else:
            run(cmd)
Pull changes from the default remote repository.
dataset/ETHPy150Open ronnix/fabtools/fabtools/mercurial.py/pull