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


Message #22 received at 36534-done <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Valentin Gatien-Baron <valentin.gatienbaron <at> gmail.com>,
 36534-done <at> debbugs.gnu.org
Cc: Lars Magne Ingebrigtsen <larsi <at> gnus.org>,
 Andrii Kolomoiets <andreyk.mad <at> gmail.com>
Subject: Re: bug#36534: 25.2; mercurial vc-annotate sometimes fails when using
 the evolve mercurial extension
Date: Thu, 10 Dec 2020 02:39:41 +0200
Version: 28.1

Hi Valentin,

Sorry we're only doing this now.

On 07.07.2019 07:55, Valentin Gatien-Baron wrote:

> 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}"))))
> 
> (another reason to stop using `hg parents` is that during a merge, it
> will in most cases print two revisions, so if you annotate a file that
> was last changed in revision 123, emacs will likely get 123123 back
> and `hg annotate -r 123123` will fail)

Thanks for the thorough explanation. I have installed the patch in 
revision 4f352ad6f1 on master. Kinda messed up the attribution, but 
alas, not something I can fix now.

Aside from improved compatibility, the new implementation seems 
considerably faster, too. Like 100ms vs 600ms on mozilla-central, which 
is a huge repo.




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.