# Mercurial not updating

**URL:** https://www.finalbuilder.com/forums/t/mercurial-not-updating/1776
**Category:** Discussion
**Created:** [June 13, 2011, 12:02pm UTC](https://www.finalbuilder.com/forums/t/mercurial-not-updating/1776 "2011-06-13T12:02:40Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![agustavsson](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/agustavsson/32/48_2.png) [@agustavsson](https://www.finalbuilder.com/forums/u/agustavsson)
#### Post date: [June 13, 2011, 12:02pm UTC](https://www.finalbuilder.com/forums/t/mercurial-not-updating/1776/1 "2011-06-13T12:02:40Z")

</div>

We have occasional problems with the Mercurial support in FinalBuilder. As this is on our special build machine, NOTHING on it should ever be regarded as important if it differs from what is in the central archive. So when we pull, we always have both checkboxes in the "Pull Options" tab checked ("Update" and "Force"). At least my impression was that "Force" should ignore any changes to files made on the build machine, but it seems it doesn't. Has anyone else experienced this? Or do I misunderstand?

/Anders

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [June 13, 2011, 12:28pm UTC](https://www.finalbuilder.com/forums/t/mercurial-not-updating/1776/2 "2011-06-13T12:28:02Z")

</div>

The Force option is “Run even if the remote repository is unrelated.” It is the -f command line option for hg pull.

---

<div class="post-metadata">

### Author: ![agustavsson](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/agustavsson/32/48_2.png) [@agustavsson](https://www.finalbuilder.com/forums/u/agustavsson)
#### Post date: [June 13, 2011, 1:09am UTC](https://www.finalbuilder.com/forums/t/mercurial-not-updating/1776/3 "2011-06-13T01:09:42Z")

</div>

Thanks Vincent,

Ok I guess I misinterpreted the thing a bit. We will try to delete the files in question before we pull the changed files, to see if that helps...

/Anders

---

<div class="post-metadata">

### Author: ![agustavsson](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/agustavsson/32/48_2.png) [@agustavsson](https://www.finalbuilder.com/forums/u/agustavsson)
#### Post date: [June 13, 2011, 3:06am UTC](https://www.finalbuilder.com/forums/t/mercurial-not-updating/1776/4 "2011-06-13T03:06:22Z")

</div>

After checking now, I think what we need is something corresponding to a -C command switch for updating ("ignore local changes/no backup"). Could that be possible?

/Anders

---

<div class="post-metadata">

### Author: ![paulsamways](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/p/e8c25b/32.png) [@paulsamways](https://www.finalbuilder.com/forums/u/paulsamways)
#### Post date: [June 14, 2011, 12:59pm UTC](https://www.finalbuilder.com/forums/t/mercurial-not-updating/1776/5 "2011-06-14T12:59:44Z")

</div>

Hi Anders,   
  
 \> I think what we need is something corresponding to a -C command switch for updating   
  
 Correct, a Hg Pull will not touch the local working directory, it will simply update the local repository. You need to use the clean option with Hg Update, which is exposed in the action (Update Options tab -\> Clean).   
  
 Regards,   
 Paul.

---

<div class="post-metadata">

### Author: ![agustavsson](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/agustavsson/32/48_2.png) [@agustavsson](https://www.finalbuilder.com/forums/u/agustavsson)
#### Post date: [June 14, 2011, 9:00am UTC](https://www.finalbuilder.com/forums/t/mercurial-not-updating/1776/6 "2011-06-14T09:00:04Z")

</div>

Paul,   
  
 We have the “Update” checkbox checked, of course. In the Pull action. Your answer implies I need to use an “Update” action, too, in order to get the behaviour I need?   
  
 /Anders

---

<div class="post-metadata">

### Author: ![paulsamways](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/p/e8c25b/32.png) [@paulsamways](https://www.finalbuilder.com/forums/u/paulsamways)
#### Post date: [June 15, 2011, 1:14am UTC](https://www.finalbuilder.com/forums/t/mercurial-not-updating/1776/7 "2011-06-15T01:14:38Z")

</div>

Hi Anders,   
  
 ‘Pull’ and ‘Update’ are two separate commands, pull will fetch the latest changes from the remote repository and insert them into the local repository, where as update will update your working directory with the changes from the local repository. Because you wish to discard changes in the local working directory you will need to run the update command with the clean switch.   
  
 \> Your answer implies I need to use an “Update” action, too, in order to get the behaviour I need?   
  
 This is the normal workflow when using Hg, i.e. Pull -\> Update and Commit -\> Push. We do not combine multiple Hg commands in a single action as that would make them less flexible.   
  
 Regards,   
 Paul.
