# hg commit/push/pull

**URL:** <https://forum.ansible.com/t/hg-commit-push-pull/24328>\
**Category:** Ansible Project\
**Created:** [April 26, 2017, 4:13pm UTC](https://forum.ansible.com/t/hg-commit-push-pull/24328 "2017-04-26T16:13:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![groupfiles14](https://avatars.discourse-cdn.com/v4/letter/g/54ee81/32.png) [@groupfiles14](https://forum.ansible.com/u/groupfiles14)\
**Post date:** [April 26, 2017, 4:13pm UTC](https://forum.ansible.com/t/hg-commit-push-pull/24328/1 "2017-04-26T16:13:05Z")

</div>

hg ansible module seems to have only clone? other actions cant be done with it?

---

<div class="post-metadata">

**Author:** ![John\_Gateley](https://avatars.discourse-cdn.com/v4/letter/j/4af34b/32.png) [@John\_Gateley](https://forum.ansible.com/u/John_Gateley)\
**Post date:** [April 26, 2017, 4:24pm UTC](https://forum.ansible.com/t/hg-commit-push-pull/24328/2 "2017-04-26T16:24:22Z")

</div>

Take a look at the first example on the documentation page:

```auto
# 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

```

I think this will both clone the repository if it is not there, and update it if it is there.  
Did you try it?

John

---

<div class="post-metadata">

**Author:** ![j.r.hawkesworth](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@j.r.hawkesworth](https://forum.ansible.com/u/j.r.hawkesworth)\
**Post date:** [April 26, 2017, 4:28pm UTC](https://forum.ansible.com/t/hg-commit-push-pull/24328/3 "2017-04-26T16:28:22Z")

</div>

You can do equivalent of hg update -C as well as clone.

what are you trying to achieve?

You can allways use shell module to run hg commit and hg push (or any other command line).

---

<div class="post-metadata">

**Author:** ![groupfiles14](https://avatars.discourse-cdn.com/v4/letter/g/54ee81/32.png) [@groupfiles14](https://forum.ansible.com/u/groupfiles14)\
**Post date:** [April 26, 2017, 4:32pm UTC](https://forum.ansible.com/t/hg-commit-push-pull/24328/4 "2017-04-26T16:32:53Z")

</div>

i wanted clone and its there, i want to commit/push/update
