On Sat, Jul 19, 2014 at 12:44 AM, Pauli Virtanen <pav@iki.fi> wrote:
18.07.2014 23:53, Julian Taylor kirjoitti:
On 18.07.2014 19:47, Pauli Virtanen wrote: [clip]
The other well-known alternative to bugfixes is to first commit it in the earliest maintenance branch where you want to have it, and then merge that branch forward to the newer maintenance branches, and finally into master.
wouldn't that still require basing bugfixes onto the point before the master and maintenance branch diverged? otherwise a merge from maintenance to master would include the commits that are only part of the maintenance branch (release commits, regression fixes etc.)
If I understand correctly, the idea is to manually revert the changes that don't belong in, which needs to be only done once for each, as the merge logic should deal with it in all subsequent merges.
I think there are in practice not so many commits that you want to have only in the release branch. Version number bumping is one (and easily addressed by a follow-up commit in master that bumps it again) --- what else?
The bugfix-in-release-and-forward-port-to-master seems to be the recommended practice for Mercurial:
http://mercurial.selenic.com/wiki/StandardBranching
https://docs.python.org/devguide/committing.html
I think there are also git guides that recommend using it.
The option of basing commits on last merge base is probably not really feasible with Mercurial (I haven't seen git guides that propose it either).
basing bugfixes on maintenance does allow cherry picking into master as you don't care too much about backward mergeability here, but you still lose a good git log and git branch --contains to check which bugfix is in which branch.
I don't disagree with this. Cherry picking is OK, but only as long as the number of commits is not too large
This should be the case most of the time I think. It looks like we've started backporting more and more though, even things like minor doc fixes. The maintenance overhead would be much lower if we would stick to only backporting important bug fixes. Any strategy chosen is fine with me, but I would like to see considered how this affects the number of PRs and the complexity for occasional contributors. Those contributors can't really judge what's backportable and don't want to deal with rebasing. So the new strategy would be something like: 1. bugfix PR sent to master by contributor 2. maintainer decides it's backportable, so after review he doesn't merge PR but rebases it and sends a second PR. First one, with review content, is closed not merged. 3. merge PR into maintenance branch. 4. send third PR to merge back or forward port the fix to master, and merge that. (or some variation with merge bases which is even more involved) Compare to what we did a while ago for numpy and still do for scipy: 1. all PRs are sent to master 2. hit green button after review 3. bugfix is cherry-picked and pushed directly to the maintenance branch The downside of the second strategy is indeed the occasional extra merge conflict, but having 3x less PRs, 2x less merge commits and a less confusing process for occasional contributors could well be worth dealing with that merge conflict. Cheers, Ralf and you use a tool (e.g. my
git-cherry-tree) that tries to check which patches are in and which not.
Pauli
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion