How to move bugfixes across branches in Mercurial? Or ever harder how move features across branches?

Oleksandr Gavenko gavenkoa at gmail.com
Sat Jul 16 08:29:52 UTC 2011


I ask this question at:


http://stackoverflow.com/questions/6709365/how-to-move-bugfixes-across-branches-in-dvcs

DUMB solution is make patch and apply it where you think need.

For bugfixes I get rational answer:

   You find changeset that introduce bug, update to this changeset,
   make named branch with names like 'bug#ID', fix bug in that branch
   and then propagate (merge) this fix to all branches on which you have
   interest.

   How find changeset that introduce bug? Use '$ hg bisect' or
   fix bug in some revision and check output of '$ hg blame'
   (you only interest in lines that you change by fix).

But in case of feature which you make in development branch
don't know how backport it to old release/custom branch.
Only DUMB with using patch which cause loosing all commit history.

Moving features across branches essential for whose heavily use
custom branches for custom request of employers.

Is is hard predicate for which branches feature will be needed.

I think possible use such workflow:

   You think that changesets split into groups that provide features.
   Before developing new feature you check what old (already developed)
   features it required. Next you create named branch from first revision
   in main development branch in which all old required features present
   (take it name - XXX).

   After developing feature you merge job to main development branch
   and to all needed custom branches that start their history after XXX
   in history graph.

   Note that you can not provide new feature for branches that early than
   XXX point as they require additional development (instead of just
   merging).

I think this way is too hard and fantastic.

Any another suggestions welcome!

-- 
Best regards!



More information about the Mercurial mailing list