How to pull/merge selective changesets
Martin Geisler
mg at lazybytes.net
Thu Aug 20 02:18:13 CDT 2009
"Stuart W. Marks" <smarks at smarks.org> writes:
> Here's what I've done in this situation.
>
> 1. Clone release_1 and update to a common ancestor changeset that I
> know is also in dev. Usually this changeset is the tag for the
> previous release.
>
> 2. Implement the bugfix, commit, merge with the tip, and push to
> release_1.
>
> 3. Export the bugfix changeset (not including the merge changeset).
>
> 4. Clone dev and update to the common ancestor.
>
> 5. Import the exported changeset into my dev clone using "hg import
> --exact". Merge to tip and push.
If the bugfix was made as changeset X in release_1, then instead of step
3-5 you could switch to a dev clone and use 'hg pull -r X ../release_1'
to bring it over (and then merge). That will give the same result.
I like that your technique allows allows both clones to contain
changesets not present in the other, while still being flexible enough
to allow new common changesets to be introduced.
You are in a sense implementing the scheme suggested by Abderrahim
Kitouni, except that you keep the 'common' repository implicit. Such a
repository is by its nature redundant since all its changesets will also
be present in the two main clones, so nothing is lost by not storing it
explicitly (except that one has to search a bit to find the common
ancestor point).
--
Martin Geisler
VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/.
More information about the Mercurial
mailing list