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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:51:02+00:00 2026-05-24T23:51:02+00:00

i have these two named branches in my repo. Stable and dev. My question

  • 0

i have these two named branches in my repo. Stable and dev. My question is how do i copy a bugfix patch that was changed in stable to the dev branch? i would really like to do this within the framework and not with any extension 🙂

EDIT

I set a bounty for the question because i really wanted the solution. There was a nice solution but was left mid way. So i had no other option. It now appears to have been answered. But i will let the question fair another day, just in case someone has a better solution. Hope that makes sense. 🙂

  • 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-24T23:51:03+00:00Added an answer on May 24, 2026 at 11:51 pm

    To augment Tim’s answer, a different way to approach it is how the Mercurial recommend you do it if you can, plan ahead (I’ll see if I can rustle up a link.)

    The plan goes that if you know that a bugfix/change has to go into several branches, you don’t commit that changeset into one of those places to begin with, you do it somewhere else.

    Since you’re fixing a bug, somewhere in the history of the project, that bug was introduced.

    And since the bugfix needs to go into more than one branch, that “somewhere” has to be before the point where you branched, otherwise the bug wouldn’t be in both (/all) branches.

    So, the recommended way is to fix the bug where it was introduced, and then merge that changeset into each of the branches that needs it.

    Let’s look at an example, we have default and stable branches:

    1---2---3---4---5---6---7---8---9---10       default
             \               \
              \               \
               11--------------12--13            stable
    

    Then you discover that changeset 2 introduced a bug, and the bugfix needs to be applied to both default and stable. The way you describe it in the question, it looks like you would do this:

    1---2---3---4---5---6---7---8---9---10--15       default
             \               \             /^-- merge stable into default
              \               \           /
               11--------------12--13----14          stable
                                         ^-- bugfix
    

    But this would merge changeset 13 into default as well. If you don’t want that to happen, you would instead do this:

           v-- bugfix
           14--------------------------+--+
          /                            |   \
         /                             |    \
    1---2---3---4---5---6---7---8---9--x-10--15       default
             \               \         |     ^-- merge 14 into default
              \               \        |
               11--------------12--13--16             stable
                                       ^-- merge 14 into stable
    

    For more information on how to use Mercurial in bugfixing-scenarios, the 9th Chapter of ‘Mercurial: The Definitive Guide’ is well worth the read.

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

Sidebar

Related Questions

I have a project that's consisted of two branches: STABLE and DEVELOPMENT. As the
I have these two methods on a class that differ only in one method
I have a class named A . What the difference between these two statements?
I have a git repository with two branches; one for code that's used for
I have these two tables people ============ id, name and answer_sheets ============ id, person_id,
I have a table ProductNumberDuplicates_backups, which has two columns named ProductID and ProductNumber. There
I have these two lines in my web.xml <url-pattern>/</url-pattern> : Index Servlet and <url-pattern>/login</url-pattern>
I have these two modules : package G1; sub new { my $class =
I have these two classes public class Person { } public class Company {
I have these two situations: String s = aa; s = s + aa;

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.