Mercurial not updating

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

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

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

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

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.

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

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.