fabtools.mercurial
¶
Mercurial¶
This module provides low-level tools for managing Mercurial repositories.
You should normally not use them directly but rather use the high-level wrapper
fabtools.require.mercurial.working_copy()
instead.
See also
-
fabtools.mercurial.
clone
(remote_url, path=None, use_sudo=False, user=None)[source]¶ Clone a remote Mercurial repository into a new directory.
Parameters: - remote_url (str) – URL of the remote repository to clone.
- path (str) – Path of the working copy directory. Must not exist yet.
- use_sudo (bool) – If
True
executehg
withfabric.operations.sudo()
, else withfabric.operations.run()
. - user (str) – If
use_sudo is True
, runfabric.operations.sudo()
with the given user. Ifuse_sudo is False
this parameter has no effect.
-
fabtools.mercurial.
update
(path, branch='default', use_sudo=False, user=None, force=False)[source]¶ Merge changes to a working copy and/or switch branches.
Parameters: - path (str) – Path of the working copy directory. This directory must exist and be a Mercurial working copy.
- use_sudo (bool) – If
True
executehg
withfabric.operations.sudo()
, else withfabric.operations.run()
. - user (str) – If
use_sudo is True
, runfabric.operations.sudo()
with the given user. Ifuse_sudo is False
this parameter has no effect.
-
fabtools.mercurial.
pull
(path, use_sudo=False, user=None)[source]¶ Pull changes from the default remote repository.
Parameters: - path (str) – Path of the working copy directory. This directory must exist and be a Mercurial working copy with a default remote to pull from.
- use_sudo (bool) – If
True
executehg
withfabric.operations.sudo()
, else withfabric.operations.run()
. - user (str) – If
use_sudo is True
, runfabric.operations.sudo()
with the given user. Ifuse_sudo is False
this parameter has no effect.