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 4599844
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T23:35:57+00:00 2026-05-21T23:35:57+00:00

Background: I have used Mercurial myself as a single user to keep track of

  • 0

Background:

I have used Mercurial myself as a single user to keep track of the changes I make to my own code, and I think I am already familiar with the fundamentals. However, I am now about to start working on a software project with somebody else in my lab and want to make sure I understand how to properly share code with somebody else using Mercurial.

Our situation is the following: We both have our own repository in a shared volume (i.e. different paths) in a Linux cluster, and we both have read and write access to our own and each other’s repositories.

We can call these two repositories: Bob‘s and Alice‘s repositories for the purpose of the discussion.

My understanding is that there are multiple ways of having Bob and Alice share their code, two of them being the following:

Option 1: Sharing via pulling

  • Bob pulls from Alice whenever he wants to see her changes
  • Similarly, Alice pulls from Bob whenever she wants to see his changes.

Option 2: Sharing via pushing

  • Bob pro-actively pushes his changes into Alice’s repository whenever he wants to share his changes with her.
  • Similarly, Alice pro-actively pushes her changes into Bob’s repository whenever he wants to share his changes with her.

Questions:

My interpretation from reading the Mercurial documentation and tutorials online is that the first option above is usually preferred over the second one. One question I have is why?

Can the second option above lead to any problems? What would happen if Bob commits into his own repository while Alice also pushes her changes simultaneously into Bob’s repository?

Thanks

  • 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-21T23:35:58+00:00Added an answer on May 21, 2026 at 11:35 pm

    Either works and in the end it really doesn’t matter because pushing/pulling doesn’t do the update or the merge for the recipient — it just moves changeset into the underlying repo, not into the working directory.

    The first option, pulling, is more commonly done because:

    • usually you don’t have write access to one another’s repos (and probably shouldn’t) and with pulling you only need read access to one another’s repos
    • when you push changesets to someone there’s no notification to them that they received new changesets. They won’t discover it until they run hg summary (or hg heads or hg log) and then they’ll have to hg merge. So as long as the recipient has to take an explicit action (check and merge) to get your changes they may as well just pull and merge instead. It’s no more work for them and less for you.

    As others have pointed out a repository write-look will prevent commiting during incoming push or pull operations.

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

Sidebar

Related Questions

I have to remove background of selectbox, I have used code like this <select
As a hardcore WinForms programmer from a Win32 background I have always used Spy++
I have used the following css file to over background bg.jpg with a repeat-x
I have a simple challenge with a background not animating. I have used this
Textarea background image scrolling when entering more text in ie8, i have used sprite
I have an IValueConverter class that is used to change the background color of
I come from Java Background and so used to Debugging using Eclipse but have
I have used html and body attributes to have a gradient background and a
I have used the & command before to make a script run another script
I have used the following code to open the current page URL in Rich

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.