Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6670651
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:17:38+00:00 2026-05-26T03:17:38+00:00

Say we have the following development setup: Team 1 in location A with a

  • 0

Say we have the following development setup:

  • Team 1 in location A with a central mercurial repo where all of this teams work gets pushed
  • 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

How can I safely synchronize the central repositories from team 1 and 2 without getting into problems with merges/multiple heads etc.?

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?

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?

Is there any other solution for this kind of problem?

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 …

I’d be glad about any kind of help here 😉

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T03:17:39+00:00Added an answer on May 26, 2026 at 3:17 am

    Well the basic rule is, never push new heads to a remote repository. Because if you do that, you will be creating heads that suddenly pop up in the other team’s repository that they have to merge, and that’s confusing. Mercurial will complain about this if you try to do it unless you specify the –force parameter.

    But other than that it is pretty standard fare; you designate one or more persons responsible for merging the two repositories (daily or so), then pull all changes from both branches, merge the two heads, and then push the result back to both repositories, just like any team member would have to do. If something is pushed while you are merging, you have to do another merge (hopefully without conflicts) before you push.

    To partially automate this, you could set up a post-push hook on the two team repository servers which asynchronously pushes the changes to the other server, and sends an email to the person responsible for merging if it fails because it would create remote heads. Because the time window where the servers are out of sync is not very long, this will probably succeed most of the time. It should include some logic to not push if it is already pushing, and to retry later if the connection is down.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say we have following this: <p class=first>This is paragraph 1.</p> <p class=second>This is
Say we have the following method: private MyObject foo = new MyObject(); // and
Say I have the following file structure: app/ app.py controllers/ __init__.py project.py plugin.py If
Say I have the following class MyComponent : IMyComponent { public MyComponent(int start_at) {...}
Say I have the following methods: def methodA(arg, **kwargs): pass def methodB(arg, *args, **kwargs):
Say I have the following C++: char *p = new char[cb]; SOME_STRUCT *pSS =
Say I have the following web.config: <?xml version=1.0 encoding=utf-8?> <configuration> <system.web> <authentication mode=Windows></authentication> </system.web>
Say I have the following: <ul> <li>First item</li> <li>Second item</li> <li>Third item</li> </ul> How
Say I have the following string: I am the most foo h4ck3r ever!! I'm
Say I have the following interface that I want to share between my server

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.