file log does not show merge revisions from another branch

Matt Mackall mpm at selenic.com
Tue Aug 26 05:59:52 UTC 2014


On Mon, 2014-08-25 at 12:08 +0200, Thomas De Schampheleire wrote:
> Hi,
> 
> When a file was created on a named branch, and then merged into the
> default branch without further changes, my expectation is that 'hg log
> file' would show both the creation commit as the merge revision that
> introduced the file in the default branch.
> 
> However, this is not the case.

Indeed, your expectation is wrong! Mercurial does not consider that
anything interesting happened in your merge. This is important, or
merges in non-trivial projects might show thousands and thousands of
"changes" where nothing interesting happened and make it impossible to
spot the actual merged files.

> Given the --debug log output,

False, the (undocumented) debug output is misleading on merges because
it's only a comparison with p1.

If the question you're trying to answer is something like "when did file
foo first appear on branch X", then you might find it much easier to use
a revset:

hg log -r "first(contains(foo) and branch(X))"

-- 
Mathematics is the supreme nostalgia of our time.





More information about the Mercurial mailing list