The recent release of 3.4.1 gave me some more practical experience with using Mercurial for cherrypicking bugfixes, and I've found I want to do things slightly different than we do today.
Cherrypicking changesets is done with the transplant extension. I've never been 100% comfortable with this, as I feel it circumvents Mercurial's fine merging capabilites. It gives me slightly the same feeling as merging bugfixes with Subversion did, the only improvement being that each changeset is transplanted separately instead of being mashed together in one big changeset.
With transplanted changesets in the series-branches, we cannot easily compare the contents of the series-branches with the default branch, using commands such as 'hg in' or 'hg out'.
Really, the only reason I have to do cherrypicking is because we fix bugs on the unstable default branch. I can't very well pull the default branch into any of the series-repositories, as they're supposed to be stable, so I have to pick single bugfix changesets from the default branch and transplant them.
If we look at things the other way around, anything that goes into the stable series-branches should also go into the default branch (except for version bumping and tags, see my side note below).
If bugfixes are committed to the latest series-branch instead of the default branch, the series-branch can easily be pulled and merged into the default branch, and no transplants need to take place.
Conclusion ---------- Starting from series/3.5.x (whenever it is branched from default), I would like everyone to commit bugfixes for stable code directly to this branch. I'm the only one with push access to these branches on MetaNAV, since I'm the only one working as a release technician at the moment, so I will need to know when and where to pull your bugfixes from.
The series/3.4.x branch is already a mix of directly committed bugfixes and transplanted bugfixes, which complicates committing bugfixes to this branch (you need to checkout the latest bugfix revision and commit your changes as a child node to that changeset, then merge the whole thing with the last head). This is why I won't start requiring this method of bugfixing until 3.5.x is on its way and this can be done more consistently.
Side note --------- For those of you who haven't looked at the series-repositories, please be aware of the specifics of how I tag a new release version on these. I'll use the 3.4.x branch as my example.
When I'm satisified that the latest changeset (A) on the 3.4.x branch is ready to become the 3.4.1 release, I change the version number in the file VERSION to 3.4.1 and commit it (changeset B). I then tag changeset B as "3.4.1". The tag changeset itself becomes changeset C.
When committing bugfixes and other changes for a later 3.4.2 version, I check out changeset A again, and base my changes on this. This is because I don't want the VERSION file in the following changesets to say "3.4.1", but rather "3.4.x_devel", as it did in changeset A. Also, I don't want to pull the changesets that changed the VERSION file into the default branch at a later time.
This may seem a bit contrived, and it leads to having multiple heads in any series-branch, but so far I haven't thought of a more useful way of updating the VERSION file without changing it back and forth all the time.
On Fri, 18 Jul 2008 12:46:35 +0200 Morten Brekkevold morten.brekkevold@uninett.no wrote:
This may seem a bit contrived, and it leads to having multiple heads in any series-branch, but so far I haven't thought of a more useful way of updating the VERSION file without changing it back and forth all the time.
Posting to nav-dev creates a stir in the old grey matter and causes the synapses to fire. Upon reading what I wrote, I quickly came up with an alternative and IMHO simpler approach to this.
* When the 3.4.x branch is ready for 3.4.2 release at changeset A, I will commit changeset B, which bumps the version number in the VERSION file.
* I will then update my working copy to changeset A again, tag changeset B as version 3.4.2, creating changeset C.
* I will then merge changeset B and C, but keep the contents of VERSION as it was in changeset A. In other words, I'm closing the the extra release head in the branch, and maintaining a single head for the 3.4.x branch.
I've already gone ahead and closed the release heads of series/3.4.x, and the entire series/3.4.x branch has been merged with the default branch (basically, the only changes to the default branch was the addition of the three release tags present in 3.4.x). The previously transplanted bugfixes will appear twice in the default branch, but they've merged cleanly at the tip.
Net result: Your bugfixes to released code can and should now be applied to the series/3.4.x branch, which can then be merged with default, as described in my previous posting.
If there are questions, don't hesitate to ask them here. I foresee a possible discussion here at Monday's status meeting, though ;)