Avoiding massive merges
John Levon
levon at movementarian.org
Fri Sep 7 18:18:57 CDT 2007
On Fri, Sep 07, 2007 at 03:41:28PM -0700, Stuart W. Marks wrote:
> >Actually not quite correct - we had no changes to upstream at all. As
> >the ASCII art showed, the 3.0.4 tree had branched off, and we needed to
> >move onwards to 3.1 - since the 3.1 tree doesn't have that 3.0.4 branch,
> >a merge was needed (and always will be).
>
> Oh. I guess I completely misinterpreted the ASCII diagram to represent the
> common "merge local changes with upstream changes" problem. If you're not
> doing this, then I guess I have the same question as Francesco -- I don't
> understand what needs to be merged here. But since others have apparently
> solved your problem, it might not be worth your effort to continue trying
> to explain it. Though I am curious....
As Thomas said it's not so much a merge as chopping off a head. Imagine
we have:
0
|
1\
\
a
\
b
This is what the 3.0.4 repository looks like. Now we hg pull from the
3.1 repository:
0
|
1\
| \
2 a
| \
3 b
|
4
And we're at 'b'. We want to get to '4'. Now if we did hg update -C 4,
then we'd have the dirstate represent the contents of '4' (xen 3.1), but
the repository would still have two heads, 'b' and '4'. So we need a
"merge" like so:
0
|
1\
| \
2 a
| \
3 b
| |
4 /
\ /
\ /
5
where the "merge" contains 1,2,3,4 but none of the effects of a and b.
See?
regards
john
More information about the Mercurial
mailing list