Unnecessary merges?
Matt Mackall
mpm at selenic.com
Fri Nov 22 19:16:59 UTC 2013
On Fri, 2013-11-22 at 17:07 +0000, David Smith wrote:
> Afraid I'm still confused.
Almost certainly. One source of that confusion is that you're looking at
the file-level history.
An 'hg merge' is necessary when you have any divergence at the top
level. Whether that will result in a file-level merge depends on that
file's contents at three points:
- the revision you're on
- the revision you're merging in
- the ancestor of those two revisions _at the top level_
You can see those file contents with:
- hg cat myfile -r .
- hg cat myfile -r <other>
- hg cat myfile -r "ancestor(., <other>)"
If those three are different, you're going to need a merge. Things are
somewhat more complicated when copies are involved.. but odds are quite
good that if you spot a problem while doing something this routine, it's
in your understanding.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial
mailing list