title: Synchronize 2 mercurial repositories
body: <p>Say we have the following development setup:</p>
  
  <ul>
  <li>Team 1 in location A with a central mercurial repo where all of this teams work gets pushed</li>
  <li>Team 2 in location B (halfway around the world from team 1 and with a flaky internet connection) with its own central mercurial repo where all of this teams work gets pushed</li>
  </ul>
  
  <p>How can I safely synchronize the central repositories from team 1 and 2 without getting into problems with merges/multiple heads etc.?</p>
  
  <p>I would assume that a scheduled push/pull from one of the repositories (in location A for example) to/from the other would handle this, but how do I handle situations where there are multiple heads involved?</p>
  
  <p>For example:
  Team 1 pushes a commit, in the mean time team 2 also pushes. Now when the repo in location A pulls the changes, it get's multiple heads. Now what do I do? Would the solution here be to let a developer from team 1 (in location A) merge the heads and push them back to his central repo so that the next scheduled push to location B pushes the merge? These would lead to problems if team 2 already pushed other changes to its central repository, correct?</p>
  
  <p>Is there any other solution for this kind of problem? </p>
  
  <p>What I want to avoid is that team 2 has to wait for its internet connection to stabilize to push its changes back to team 1 ...</p>
  
  <p>I'd be glad about any kind of help here ;-)</p>