Discrepancy in outputs from "hg log"

Matt Mackall mpm at selenic.com
Thu Jun 11 23:07:49 CDT 2009


On Fri, 2009-06-12 at 12:16 +1000, Peter Williams wrote:
> I'm seeing discrepancies in the files reported using:
> 
> --template "{files}\n"
> 
> and the files in the diff obtained with the --patch option.
> This occurs for all variations of the "files" template argument, also 
> occurs for "incoming" and "outgoing" commands and as far as I can see 
> only occurs when the rev in question has two parents.
> 
> More often than not there are no files reported at all which is why I 
> noticed it.
> 
> I realise that there are probably two different sets of files that could 
> be reported in this case (one for each parent) but wouldn't the output 
> of one of these sets be better than no output?  Probably the set that is 
> associated with the parent that the --patch option uses for its output.

On large projects, clean merges where one side or the other 'change'
hundreds or thousands of files are quite common. The list the changelog
stores is the list of files that actually have a new revision stored for
that changeset. If there's no merge conflict on a file, there's no
mention of the file in a merge changeset.

Folks, if you center your thinking around hg diff, which has output
_tailored to be compatible with tools from the 70s_[1], you're not
understanding Mercurial.

[1] Or, optionally, from hell: http://tinyurl.com/mfbvqp

-- 
http://selenic.com : development and support for Mercurial and Linux




More information about the Mercurial-devel mailing list