I have two development machines. One machine is setup to use a specific Mercurial account. I’d like to setup the second machine in exactly the same way, using the same Mercurial account. As I switch between machines I will push and pull changes to keep the two dev machines in sync.
Will Mercurial cope ok with this scenario, or should I create a second Mercurial account for this purpose?
My worry is that Mercurial will ‘see’ the same account on the second machine and not synchronize properly because it ‘thinks’ the second machine already has the changes (which are actually only present on the first machine).
I’m using VS2010, TortoiseHg and VisualHg.
Thanks.
Using the same account will work perfectly fine.
Mercurial will look at what is actually in the local copy when pulling changes and updating, the fact that you have another clone on another machine using the same credentials will not affect it at all.
Your credentials are really only used to authenticate you (to ensure you have permission to read when pulling and write when pushing) and to label each commit with the user who made it.
You can even have multiple local copies cloned from the same repository, using the same credentials. Each copy tracks its own state – each revision has a unique id that is used to synchronize changes.
If you have not already, I recommend reading this Mercurial tutorial.