def update(path, branch="default", use_sudo=False, user=None, force=False):
    cmd = "hg up %s" % branch

    with cd(path):
        if use_sudo and user is None:
            run_as_root(cmd)
        elif use_sudo:
            sudo(cmd, user=user)
        else:
            run(cmd)
Merge changes to a working copy and/or switch branches.
dataset/ETHPy150Open ronnix/fabtools/fabtools/mercurial.py/update