[Bug 3613] New: "hg log <file>" on a file that was renamed returns different results in 'slowpath' versus 'fastpath'

bugzilla-daemon at bz.selenic.com bugzilla-daemon at bz.selenic.com
Thu Sep 6 19:11:52 CDT 2012


          Priority: normal
            Bug ID: 3613
                CC: mercurial-devel at selenic.com
          Assignee: bugzilla at selenic.com
           Summary: "hg log <file>" on a file that was renamed returns
                    different results in 'slowpath' versus 'fastpath'
          Severity: bug
    Classification: Unclassified
                OS: Linux
          Reporter: smuralid at yahoo.com
          Hardware: Other
            Status: UNCONFIRMED
           Version: 2.3
         Component: Mercurial
           Product: Mercurial

I'm seeing what I think is a bug (or at least an inconsistency) in "hg log"

If I run the following sequence of actions
  hg init follow
  cd follow
  echo 123 > foo
  hg add foo
  hg ci -m "Add foo" # commit 0
  hg mv foo bar
  hg ci -m "Rename foo to bar" # commit 1
  hg log foo
  hg log foo nonexistingfile

The first call to "hg log foo" returns 1 record - that
corresponding to commit #0. However, the second one returns both commit 1
and commit 0, and that's because the 'nonexistingfile' caused hg log
(walkchangerevs()) to use the slow path, which walks all the revisions,
and checks to see if the any of the files specified on the command exists in
any of those revisions, and it does.

I ran into this issue as I was attempting to fix issue 1340, and one of the
unit tests started failing with my fix (and I believe that the new result is
actually correct) :-)

You are receiving this mail because:
You are on the CC list for the bug.

More information about the Mercurial-devel mailing list