Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a mercurial repository with numerous branches for stable, development, experimental features etc. However, I've found a bug in a set of core application files that are common to each branch.

Is there a way to modify these files, and then push the changes to the common files to all the other branches, without sending any other changes?

share|improve this question
up vote 2 down vote accepted

The ideal way is to make the changes on the most stable branch, and then merge the change into the other branches. If you can, you should aim to have a hierarchy of branches so that stable is a subset of development, which is a subset of experimental.

That means that you will always pull from stable into development, and from development into experimental. This way you wont forget to propagate a bugfix, you just always pull and merge.

However, people do forget to put the bugfixes on the right branch from time to time. It also happens that a bugfix is upgraded in severity after it was put on development, say, and now you need it on stable as well.

The transplant extension is there to help you with that. You use it to copy a change from one place to another. Please see my recent tutorial on tast based development for nice screenshots and a walk-through.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .