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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:07:51+00:00 2026-05-26T08:07:51+00:00

In our mercurial project configuration we have 3 branches in a single repository. One

  • 0

In our mercurial project configuration we have 3 branches in a single repository. One is a stable release branch where urgent bug fixes are done, one is a feature branch which contains new feature code and one is a UAT branch where both bug fixes and new features are merged into to provide the most up-to-date code base.

We have merged a whole load of new feature code into the UAT branch without any issues at all. Following that we merged the stable branch with the bug fixes into the UAT branch but this seems to have the effect of removing the new feature code. I have discovered that this problem has been caused by someone merging UAT into stable a while ago (which should have never happened!!). Now when I try to merge the bug fixes into UAT it removes all the new feature code.

Is there a way of removing the effects of the merge from UAT into stable, whilst still retaining the bug fixes that are descendents after this ‘bad merge’? I’ve tried backing out the merge but it seems to have no effect at all. Can I do a strip and re-add the required changesets back in?

Thanks in advance.

  • 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-26T08:07:52+00:00Added an answer on May 26, 2026 at 8:07 am

    I’ve actually managed to fix this one myself through a bit of trial and error.

    First you need to enable the transplant and mqMerge extensions in your mercurial.ini file. Add the lines following lines below the extension header

       transplant=
       mq=
    

    Clone a your repository to a new location.
    In your new repo, remove the bad merge by using the strip command to clear history the effect of the bad merge is removed. (Beware that this will remove all descendent changesets)

    Then you need to cherrypick all the required changesets in chronological order from the other repo by using a command similar to below

        hg transplant -s "otherRepo" -b "branchName" "changesetHexNumber"
    

    Repeat the transplant command for all the required changesets. Ouila!

    NB: If you are using a central repository you will need to strip the offending merge/changset on there too otherwise your local repo will think you have outstanding changesets to pull.

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

Sidebar

Related Questions

I have imported our SVN repository into Mercurial and now we have entries for
I have switched our internal codebase to use Mercurial, with a hosted remote repository.
When we merge changes from our Mercurial feature release repositories into our trunk repository,
Original Problem In building our projects, I want the mercurial id of each repository
We are in the process of switching to Mercurial. Our repository has a number
I'm researching using Mercurial for our companies source control system. One immediate requirement that
Our project switched over from SVN to Mercurial recently. In SVN, to version our
we are using mercurial as source control in one of our projects. We are
My team and I have found that documenting our project (a development platform w/
Are there any Mercurial clients for Windows that have integrated SVN support? Our build

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.