GNU bug report logs - #36534
25.2; mercurial vc-annotate sometimes fails when using the evolve mercurial extension

Previous Next

Package: emacs;

Reported by: Valentin Gatien-Baron <valentin.gatienbaron <at> gmail.com>

Date: Sun, 7 Jul 2019 08:50:02 UTC

Severity: normal

Found in version 25.2

Fixed in version 28.1

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Andrii Kolomoiets <andreyk.mad <at> gmail.com>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 36534 <at> debbugs.gnu.org, Lars Ingebrigtsen <larsi <at> gnus.org>, Daniel Colascione <dancol <at> dancol.org>, Valentin Gatien-Baron <valentin.gatienbaron <at> gmail.com>
Subject: bug#36534: 25.2; mercurial vc-annotate sometimes fails when using the evolve mercurial extension
Date: Wed, 02 Dec 2020 13:17:56 +0200
Dmitry Gutov <dgutov <at> yandex.ru> writes:

> On 26.11.2020 13:56, Lars Ingebrigtsen wrote:
>> Valentin Gatien-Baron <valentin.gatienbaron <at> gmail.com> writes:
>> 
>>> Sometimes, vc-annotate in a file tracked by mercurial returns an
>>> error like this instead of a proper annotate buffer:
>> [...]
>> 
>>> Step 3 is probably an hg bug. However `hg parent` was deprecated in
>>> 2014, so people may be reluctant to change it. And it would be simpler
>>> for vc-hg-working-revision to call `hg log -r . -T {rev}` (vc-git does
>>> that, so I assume that it works in general on top of fixing the
>>> current issue). `.` means the current revision, see `hg help revset`.
>>>
>>> So something like this:
>>> (defun vc-hg-working-revision (file)
>>>    "Hg-specific version of `vc-working-revision'."
>>>    (ignore-errors
>>>      (with-output-to-string
>>>        (vc-hg-command standard-output 0 nil
>>>      "log" "-r" "." "--template" "{rev}"))))
>> (This bug report unfortunately got no response at the time.)
>> I'm pretty unfamiliar with Mercurial, but perhaps Dmitry has some
>> comments here (added to the Cc's).
>
> I have very little experience with Mercurial myself.
>
> Perhaps Daniel or Andrii can comment.

Valentin did a pretty good investigation here.

But proposed change make the `vc-hg-working-revision` function ignore
the FILE arg, so the result will differ.

1. mkdir working-revision
2. cd working-revision
3. hg init
4. echo a > a
5. hg commit -Am0
6. echo b > b
7. hg commit -Am1
8. hg parent --template {rev} a
   => 0
   This is the old behavior of the `vc-hg-working-revision`
9. hg log -r . --template {rev}
   => 1
   And this is the new one.

Not sure what it may leads to.  Indeed the `vc-git-working-revision`
function ignores FILE as well.




This bug report was last modified 4 years and 245 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.