From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrii Kolomoiets Newsgroups: gmane.emacs.bugs 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 Message-ID: References: <87360wuya0.fsf@gnus.org> <63844114-d90b-bb91-f025-59583cb76433@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18339"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (darwin) Cc: Valentin Gatien-Baron , 36534@debbugs.gnu.org, Lars Ingebrigtsen To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 02 12:46:35 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kkQag-0004ce-BA for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 02 Dec 2020 12:46:34 +0100 Original-Received: from localhost ([::1]:48626 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kkQaf-0007PR-93 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 02 Dec 2020 06:46:33 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42630) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kkQA3-0001YI-La for bug-gnu-emacs@gnu.org; Wed, 02 Dec 2020 06:19:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51208) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kkQA1-00009M-PP for bug-gnu-emacs@gnu.org; Wed, 02 Dec 2020 06:19:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kkQA1-0002Az-KN for bug-gnu-emacs@gnu.org; Wed, 02 Dec 2020 06:19:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Andrii Kolomoiets Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 02 Dec 2020 11:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36534 X-GNU-PR-Package: emacs Original-Received: via spool by 36534-submit@debbugs.gnu.org id=B36534.16069078948304 (code B ref 36534); Wed, 02 Dec 2020 11:19:01 +0000 Original-Received: (at 36534) by debbugs.gnu.org; 2 Dec 2020 11:18:14 +0000 Original-Received: from localhost ([127.0.0.1]:34519 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kkQ9F-00029s-Uy for submit@debbugs.gnu.org; Wed, 02 Dec 2020 06:18:14 -0500 Original-Received: from mail-lf1-f54.google.com ([209.85.167.54]:41017) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kkQ9E-00029e-8v for 36534@debbugs.gnu.org; Wed, 02 Dec 2020 06:18:13 -0500 Original-Received: by mail-lf1-f54.google.com with SMTP id r24so3996319lfm.8 for <36534@debbugs.gnu.org>; Wed, 02 Dec 2020 03:18:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=AahLXcDu/HNF1P0PbCOQsZ8mWl89yKvXJReemSzOFUA=; b=arvyIkD39+GPhkHi7f7nsiUooWsE8tT+4JOuWfkW7Vx046GiG3263DomCyCxhFQ2sk 6KFfFOLtjSBt7rlM6wFns5ivLR/PB8supggPQqPRf2mDYhd1a6WyAoBOi4aeIb7uHFNN py/k8dWrJHWdoWU38ejHFtE4rFNwyYEmTL+W5NdWg3TyyXKT8MftPPg84o+yPX/dGrTs sSLewsz/qaIEIQdfKJUe1eYrX7pmPbXFm3VQi7hcKkBPbpuCGiE4RND6s+FPD0SDIwWH TOgux7OmlWxHG+2TrcgwVOoPZBy17vor4fkxF93Cimp/0VLRxZe0r2TlRdMTu70ygXRk +S4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=AahLXcDu/HNF1P0PbCOQsZ8mWl89yKvXJReemSzOFUA=; b=WYVxUft7V+rYghqzxGYdfjsAwtTq8qSNcoRaWvR6Xx04Sndel3O5G1ofpnaIw5SWBD VBC7D7yRV91rJ5PimjgCd+xcT+JnQklJtQqL3loZAFR9SL0NJcYQ5U2v6KLyHWLzA8/r 03cBAAQ98U2zgFFWYSARJjSHsoLBd5SkowP6UhSi7ac6pQ7f2lQGlKz2tBKnXWXEH6sF ybSJY9TRz1s66te+TYszOeotd/B9ceEvpNh1pCxjCFg5Zcm6OWs+ZH3qlkEeV+ssSKdM 7337BGi9XVEe9hu3mkczUKVe0wlx1NOmmO1mVuN49gtxypJohNF0w4OX4ynGiSPO8bi8 I7Lg== X-Gm-Message-State: AOAM533cSyEbkJG/neTKesfKwq1+INonxcG/L+EBtepJHJwq6idqh2iL 7B2D+POjNke95/eu1cdIIrw= X-Google-Smtp-Source: ABdhPJySXCUmI6r8PDfmHWcMwp7/b8yng+GyEnindphiEYSSw8v3gYAGuZhJv9fe87fT7D6dTi+56w== X-Received: by 2002:a19:c393:: with SMTP id t141mr1055857lff.529.1606907886179; Wed, 02 Dec 2020 03:18:06 -0800 (PST) Original-Received: from muffinmac ([91.206.110.206]) by smtp.gmail.com with ESMTPSA id o26sm379675ljj.93.2020.12.02.03.18.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2020 03:18:05 -0800 (PST) In-Reply-To: <63844114-d90b-bb91-f025-59583cb76433@yandex.ru> (Dmitry Gutov's message of "Sat, 28 Nov 2020 20:17:08 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:194789 Archived-At: Dmitry Gutov writes: > On 26.11.2020 13:56, Lars Ingebrigtsen wrote: >> Valentin Gatien-Baron 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.