Reputation: 679
I need to make a point in time branch, when we release a new version.
So i have Default branch for all development, and V1, V2 etc. branch for every time a new release is made to a server.
So if I have default development branch. V1 is at the Live server. V2 is at the Test server.
How do I handle the following scenarios:
A bug is found in V1, and the change need to go in V1, V2, and default?
V2 is made at some point in time and goes to the test server, development continuous with multiple features in default. After some testing of V2, the feature was not complete and some of the changesets in default, should be merged back in V2 - but not all the changesets?
Upvotes: 1
Views: 99
Reputation: 21026
The usual method is to locate the changeset that introduced the bug (before the branching point of V1), and commit the fix as a child of that changeset. This will introduce a new head, which you can then merge into the branches where you want the fix, in this case V1, V2 and default.
This method is called “daggy fixes”.
Alternatively you can also fix it on one branch (say, default) and then cherry-pick it onto the other branches using the graft
command. But that isn’t as nice, as the changeset will appear three times and could potentially cause merge problems if you ever merge two of those branches together again.
Upvotes: 5