Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.