"Backport" in Monticello
Avi Bryant
avi at beta4.com
Tue Sep 14 14:13:53 UTC 2004
One of the new features in the just released version of Monticello is a
new "Backport" button on the Monticello Browser. Backporting is a way
of selectively moving changes from a version to its ancestor (perhaps
from a private or experimental branch back to the mainline), without
introducing conflicts into future merges.
To use Backport, you must have just saved your working copy - if your
package is marked with the modified *, Backport will be disabled. When
you press Backport, you will first be asked to pick the ancestor
version you want to backport to. You will then be presented with a
multi-select list of all the changes between that ancestor and the
current version. Choose only the changes you want to backport, and
then press the "Select" button.
Any changes you didn't select will then be reverted; that is, your
image will now contain only the code from the ancestor version, plus
the changes that you chose. You can now save this backported version,
merge it into something else, or whatever you like.
The system records the fact that this new version was backported from a
later version, and will make use of that information when merging. For
example, if you backport some changes in version C to its ancestor A,
making a backported version B, and you then make some new changes to B
and save that as B', then when merging B' into C, only the difference
between B and B' will be considered. One possible scenario this
enables is the following:
The "maintainer" has a mainline branch.
The "contributor" sends the maintainer a version with two different
changes, X and Y.
The maintainer only wants to integrate change X, and asks the
contributor to separate it out.
The contributor backports change X to a released version, and sends
this backport to the maintainer.
The maintainer merges the backport into the mainline, and later release
a new version.
The contributor should be able to merge this new release into their
branch, without:
- losing change Y
- having any conflicts to do with change X
In other words, it's possible to keep two parallel branches, and
repeatedly but selectively merge between them, without seeing any
spurious conflicts or unexpected removals.
At various points there have been requests that when merging versions,
you be able to select only some of the changes to merge. You can use
the Backport facility to do this as follows:
- load the version you want to merge some of the changes from
- backport those changes to the common ancestor with the version you
want to merge into
- save this backported version
- load your version, and merge in the backport
Eventually, it would of course be nice to have a more automated UI for
doing that...
Anyway, please let me know what your experiences are with this feature,
both good and bad, or if you need more info about it.
Avi
More information about the Squeak-dev
mailing list
|