hg - Manages Mercurial (hg) repositories.

Author:Yeukhon Wong

Synopsis

New in version 1.0.

Manages Mercurial (hg) repositories. Supports SSH, HTTP/S and local address.

Options

parameter required default choices comments
dest yes
    Absolute path of where the repository should be cloned to.
    executable no
      Path to hg executable to use. If not supplied, the normal mechanism for resolving binary paths will be used. (added in Ansible 1.4)
      force no yes
      • yes
      • no
      Discards uncommitted changes. Runs hg update -C.
      purge no no
      • yes
      • no
      Deletes untracked files. Runs hg purge.
      repo yes
        The repository address.
        revision no default
          Equivalent -r option in hg command which could be the changeset, revision number, branch name or even tag.

          Examples


          # Ensure the current working copy is inside the stable branch and deletes untracked files if any.
          - hg: repo=https://bitbucket.org/user/repo1 dest=/home/user/repo1 revision=stable purge=yes

          Note

          If the task seems to be hanging, first verify remote host is in known_hosts. SSH will prompt user to authorize the first contact with a remote host. To avoid this prompt, one solution is to add the remote host public key in /etc/ssh/ssh_known_hosts before calling the hg module, with the following command: ssh-keyscan remote_host.com >> /etc/ssh/ssh_known_hosts.

          Table Of Contents

          Previous topic

          github_hooks - Manages github service hooks.

          Next topic

          subversion - Deploys a subversion repository.