possible bug in hg log for files added, removed and re-added

Matt Mackall mpm at selenic.com
Sat Jun 21 13:44:27 CDT 2008


On Sat, 2008-06-21 at 19:53 +0200, Bastian Doetsch wrote:
> Am Samstag, den 21.06.2008, 12:26 -0500 schrieb Matt Mackall: 
> > On Sat, 2008-06-21 at 16:57 +0200, Bastian Doetsch wrote:
> > > Hi all,
> > > 
> > > I've stumbled over an issue in hg log that puzzles me and I think this
> > > could be a Mercurial bug, although I'm not quite sure. 
> > > 
> > > It seems as if Mercurial doesn't handle the situation properly, when a
> > > file is added, removed and afterwards re-added.
> > > 
> > > Below you can find two hg commands I entered and their correspondent
> > > results. The repository is at http://hg.assembla.com/mercurialeclipse if
> > > you wanna have a look at it.
> > > 
> > > My question is, why the first hg command doesn't yield changeset 335 as
> > > result, although the file is clearly part of the fields+ tag and was
> > > added (for the second time) in this changeset. Moreover, why isn't a
> > > changeset shown for the removal of javaCompiler...args?
> > 
> > File-level logging only shows revisions where the -contents- of a file
> > get changed. In particular it won't show:
> > 
> > - when a file is deleted
> > - when a file gets readded with the same contents
> > - when permission bits change
> > - when a merge happens without conflicts
> > 
> 
> Ah that explains it - thanks. I now wonder, what's the reason for this
> constraint?

With hg log, we read the entire changelog. With hg log <file>, we read
the individual file's log, which for a big project can be orders of
magnitude faster. And the file's log only tracks file contents.

-- 
Mathematics is the supreme nostalgia of our time.



More information about the Mercurial mailing list