Bug? "log --follow" seems broken

John W jwdevel at gmail.com
Thu Dec 11 17:31:57 UTC 2014


I have a repo, which unfortunately I cannot share, where "log
--follow" is giving weird results.

Using Mercurial 3.1.2, I got this output:

    $ hg log --follow MyFile.md
    abort: can only follow copies/renames for explicit filenames

But it was clear from examining history that MyFile.md not only
exists, but has a history of several renames. I upgraded to latest,
assuming there was some bug.

Using Mercurial 3.2.2, I got this output:

    $ hg log --follow MyFile.md --template '{rev}\n'
    1210
    1209

That's slightly better, but only goes up to the most recent rename.
I manually investigated, with:

    $ hg st --change 1209 -C MyFile.md
    A MyFile.md
      olddir/MyFilemd

So as you can see, MyFile was renamed from a different location in rev
1209. But "log --follow" did not show me those older versions.

If I do "log --follow" on the old file, I get:

    $ hg log --follow olddir/MyFile.md --template '{rev}\n'
    1209
    1096
    1095

So there is definitely old history, which I had expected "log
--follow" to report.
In fact, there was a second rename at rev 1095:

    $ hg st --change 1095 -C olddir/MyFile.md
    A olddir/MyFile.md
      OldFileNamemd

So both invocations of "log --follow" are failing in a similar way.

As I said, I can't share the repo, but I'm happy to run commands
against it if it would help diagnose the issue.

Thanks
-John

PS: I would log a bug, but bugzilla has not emailed me after I
requested an account. Nor is it sending me a password reset for an old
account. Is BZ email working?


More information about the Mercurial-devel mailing list