Created attachment 1781 [details] Test repository exhibiting the problem For the test repository, observe the following: faheem@orwell:~/test-evolve$ hg log -vG -r 23 --stat --hidden @ changeset: 23:b2966c6c2bba | tag: tip | user: Faheem Mitha <faheem@faheem.info> | date: Fri Jul 11 18:46:37 2014 +0530 | files: bar | description: | New file bar | | | bar | 3 +++ | 1 files changed, 3 insertions(+), 0 deletions(-) | faheem@orwell:~/test-evolve$ hg log -vG -r 23 bar --stat --hidden [Returns nothing] Bar was created in cset 23, but `hg log bar` and variations returns nothing. faheem@orwell:~/test-evolve$ hg phase -r 23 23: public faheem@orwell:~/test-evolve$ hg --version Mercurial Distributed SCM (version 3.0.1) This was also mentioned in an email to mercurial@selenic.com, with the title 'hg log filename' does not show tip cset that was sent today. But at time of writing this does not show up in the mailing list archives.
Appears to be a duplicate of the classic linkrev bug (bug 3004). $ hg debugindex bar rev offset length base linkrev nodeid p1 p2 0 0 16 0 19 dd12636e8abe 000000000000 000000000000 This seems to be interacting extra-badly with hidden changesets, so probably warrants extra attention.
Yop, linkrev + hidden changelog entry → bad things happen. Need a rework of linkrev.
Fixed by http://selenic.com/repo/hg/rev/8ec03e0ef51a Pierre-Yves David <pierre-yves.david@fb.com> linkrev-filelog: handle filtered linkrev with no visible children (issue4307) If the file revision with a filtered linkrev does not have any (unfiltered) children, we cannot use it to bound the search for another introduction. Instead, we have to look at the file revision used by each head changeset. If one of them uses this file revision, we know there is another occurrence and we have a starting point. See inline comments for details. Adding some kind of permanent reference of all the introductions of a file revision instead of just the first one would be much better. But this is more difficult. I hope to take that into account in the next repository format. (please test the fix)
I downloaded my own attachment and ran the commands below with 3.3 rc and evolve default brahch, with tip/head de73285cf50. I can still reproduce it. As in, I get exactly the same results. Am I missing something?
I guess that this file revision have been introduced by another visible changesets. That case is not fixed yet see issue 3004
Per Pierre-Yves suggestion: aheem@orwell:/tmp/test-evolve$ hg log -vGf -r 23 bar --stat --hidden @ changeset: 23:b2966c6c2bba | tag: tip | user: Faheem Mitha <faheem@faheem.info> | date: Fri Jul 11 18:46:37 2014 +0530 | files: bar | description: | New file bar | | | So it works if I do `-f`.
As pointed out by Sean, if one alternatively does hg log -vG -r 23 bar --stat without the --hidden, it also works. I.e. faheem@orwell:/tmp/test-evolve$ hg log -vG -r 23 bar --stat @ changeset: 23:b2966c6c2bba | tag: tip | user: Faheem Mitha <faheem@faheem.info> | date: Fri Jul 11 18:46:37 2014 +0530 | files: bar | description: | New file bar | | | bar | 3 +++ | 1 files changed, 3 insertions(+), 0 deletions(-) | I don't understand what the reason for this could be, though.
Bug was set to TESTING for 7 days, resolving
Nobody responded to my comment wrt to why --hidden makes the log entry disappear. In any case, can someone else verify this? It seems to me like a bug.
Each file revision is reported once. Adding --hidden reveal an earlier introduction of this file revision, changing the revision for which it is reported. Known 10 years old issue, the situation improved significantly this cycle but there is still room for improvement.
Tip with your test repo: $ hg log bar changeset: 23:b2966c6c2bba tag: tip user: Faheem Mitha <faheem@faheem.info> date: Fri Jul 11 18:46:37 2014 +0530 summary: New file bar $ hg log bar --hidden changeset: 19:d03de61c795e user: Faheem Mitha <faheem@faheem.info> date: Fri Jul 11 14:27:11 2014 +0530 summary: temporary amend commit for d3ad107c8e38 Note that the hidden view of things is _different_: bar was introduced at 19 and 23 is just a duplicate reintroduction of the same change. Mercurial has always shown just one such duplicate. So this shows nothing, because in --hidden-land, we know the only answer is 19: $ hg log bar --hidden -r 23 The bug that's marked "fixed" here is the fact that "hg log bar" showed nothing. The "log of a file doesn't show duplicates" thing is unlikely to change and is in fact documented: Note: for performance reasons, log FILE may omit duplicate changes made on branches and will not show removals or mode changes. To see all such changes, use the --removed switch. $ hg log --removed bar --hidden changeset: 23:b2966c6c2bba tag: tip user: Faheem Mitha <faheem@faheem.info> date: Fri Jul 11 18:46:37 2014 +0530 summary: New file bar changeset: 21:5d1003c05f55 parent: 13:2d385d13e54d user: Faheem Mitha <faheem@faheem.info> date: Fri Jul 11 14:27:14 2014 +0530 summary: Add Lines 8 and 9 to foo. Add bar with Lines 1 and 2. changeset: 20:fb9ccc346c57 parent: 13:2d385d13e54d user: Faheem Mitha <faheem@faheem.info> date: Fri Jul 11 14:27:11 2014 +0530 summary: Add Lines 8 and 9 to foo. changeset: 19:d03de61c795e user: Faheem Mitha <faheem@faheem.info> date: Fri Jul 11 14:27:11 2014 +0530 summary: temporary amend commit for d3ad107c8e38
Thanks for the detailed analysis, Matt. It was very helpful.