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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T02:15:44+00:00 2026-06-06T02:15:44+00:00

How do I get a bugfix I made on the default branch into a

  • 0

How do I get a bugfix I made on the default branch into a named branch in mercurial?
I recently started work on a new feature so thought I’d do this work in a branch (which I’ve not really done before) so I could keep the changes out of the main default branch until I’ve finished working on them and the feature is ready to deploy. The idea being that I could update to the default branch and apply any bugfixes as needed.

TortoiseHg Branching

Now I want to get the bugfix into my named branch. The tip (rev 739) has the change I want to incorporate into the BoardSummary branch. I know I could merge but I don’t want to bring my BoardSummary changes into the default branch.

I looked at the mercurial: apply a bugfix change from stable named branch to dev branch answer but it didn’t make sense to me.

Edit: I’m with it up to “Then you discover that changeset 2 introduced a bug”, in my case I went back to 732 fixed the bug and committed (onto the default). The idea being that the fix is in place before I branched. But now how do I get that fix into 738 without merging the 2 branches together? It looks like the bug is actually fixed in 739 – so isn’t in the BoardSummary branch yet. This seems to be what the 2nd tree shows in the answer but the 3rd diagram is explained with “you would instead do this” – I don’t understand that bit

  • 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-06-06T02:15:47+00:00Added an answer on June 6, 2026 at 2:15 am

    Evidently, your default branch contains only one changeset not present in the BoardSummary branch. You should merge default into BoardSummary, and not the other way round. This way, BoardSummary will have the fix, and none of the BoardSummary will be in default.

    To summarize:

    $ hg up BoardSummary
    $ hg merge default
    $ hg commit -m "Merge the fix for #247"
    

    An explanation

    There are a number of kinds of branches which can be employed. The most common are:

    • stable (production) branches for maintaining the released versions,
    • default (master, trunk) branch, which contains more or less stable development activity,
    • feature branches, which are not mature enough to be merged into trunk.

    The main idea here is that it is always safe to merge from stable to default, and from default to feature. This means that in terms of changesets, any stable branch is a subset of default, and default is a subset of feature branches.

    For instance, you’re reworking your data access level in a feature branch new-dal (major feature). At the same time, you’ve added a couple of new reports in default (minor features), and found and fixed a bug in a 1.0-stable. Well, just merge the branches going from the oldest to the newest (1.0-stable -> default -> new-dal), and that’s all.

    This is explained very well on the Mercurial wiki: Standard Branching: Release branches.

    Your case

    In your case, BoardSummary is clearly a feature branch, so you can merge default into it without any hesitation. The opposite should only be done if you’re ready to integrate the new feature into default.

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

Sidebar

Related Questions

I recently released a new version of my iPhone app that was built for
I've recently started working with MQ as I like the idea of working on
Get this simple python code, same matching with re.compile instance. I noticed that even
Get sunrise time and sun set times from xml from web. This is the
I've recently reinstalled OSX, and now, when trying to build a new version of
Get object 's array value in php $obj = new Basecamp($bcUrl, $bcApikey, 'X', 'simplexml');
'get list of all users on domain Dim de As New DirectoryEntry() de.Path =
Get an empty HTML, type in this and see its source code on Google
I am starting to get a reputation at work as the guy who breaks
I'm relatively new to Subversion, hoping to get some insights from more experienced folks.

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.