Discrepancy in outputs from "hg log"

Peter Williams pwil3058 at bigpond.net.au
Fri Jun 12 00:28:53 CDT 2009


Matt Mackall wrote:
> 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.

Yes, I can see that being the case.

> 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.

OK.  Thanks for the explanation.  It greatly improves my concept of how 
merge works as well.  I was imagining something much more complex 
(probably due to a lot of CVS use in the past).

> 
> Folks, if you center your thinking around hg diff, which has output
> _tailored to be compatible with tools from the 70s_[1],

My age is showing.

> you're not understanding Mercurial.

I think I understand it better now than I did when I asked the question.

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

So, to be compatible with the Mercurial semantics, in gwsmhg I should 
display whatever log/incoming/outgoing report as the files in my change 
set summary dialogs rather than obtaining the data using other hg 
commands as this is what hg users will/should expect?

Thanks
Peter
-- 
Peter Williams                                   pwil3058 at bigpond.net.au

"Learning, n. The kind of ignorance distinguishing the studious."
  -- Ambrose Bierce


More information about the Mercurial-devel mailing list