From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#68174: 30.0.50; Project and VC disagree about what repository we're in Date: Wed, 3 Jan 2024 02:13:07 +0200 Message-ID: <08d721c2-905e-4818-8c87-b1de6481d0e6@gutov.dev> References: <87bka6y041.fsf@zephyr.silentflame.com> <8c47be44-ea77-48b5-bbdf-53b4e245f7a7@gutov.dev> <8734vgqfld.fsf@zephyr.silentflame.com> <2a278850-2241-4e43-b81f-1cefdfe7d930@gutov.dev> <83v88bzwx0.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39977"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: juri@linkov.net, 68174-done@debbugs.gnu.org, spwhitton@spwhitton.name To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jan 03 01:14:16 2024 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 1rKotj-000ACr-De for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 03 Jan 2024 01:14:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rKota-000093-3l; Tue, 02 Jan 2024 19:14:06 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rKotW-00008b-AT for bug-gnu-emacs@gnu.org; Tue, 02 Jan 2024 19:14:02 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rKotU-00047x-7q for bug-gnu-emacs@gnu.org; Tue, 02 Jan 2024 19:14:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rKotW-0005UC-Lr for bug-gnu-emacs@gnu.org; Tue, 02 Jan 2024 19:14:02 -0500 Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Wed, 03 Jan 2024 00:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 68174 X-GNU-PR-Package: emacs Mail-Followup-To: 68174@debbugs.gnu.org, dmitry@gutov.dev, spwhitton@spwhitton.name Original-Received: via spool by 68174-done@debbugs.gnu.org id=D68174.170424081021031 (code D ref 68174); Wed, 03 Jan 2024 00:14:02 +0000 Original-Received: (at 68174-done) by debbugs.gnu.org; 3 Jan 2024 00:13:30 +0000 Original-Received: from localhost ([127.0.0.1]:51588 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rKosw-0005T4-Pj for submit@debbugs.gnu.org; Tue, 02 Jan 2024 19:13:30 -0500 Original-Received: from out2-smtp.messagingengine.com ([66.111.4.26]:44931) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rKosr-0005Sn-2m for 68174-done@debbugs.gnu.org; Tue, 02 Jan 2024 19:13:25 -0500 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id CABFB5C00B7; Tue, 2 Jan 2024 19:13:12 -0500 (EST) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Tue, 02 Jan 2024 19:13:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1704240792; x=1704327192; bh=CHSlHTiOI1tOacXhwl4Ru5eU9RGrGgjI35KovkRZWuk=; b= nNs+qhK/8wkBxcW83U1+fgdvseL6lFBirGw21hCtWsE/5V2akTrOAlAeSs3PyAJ/ opwIaWqIIWbilFo/B361EIbs0qE6geu0TC/TQcLMb7rc2cLndRSaNg5xuat3yoi5 70QHptvZOy19aRLHFDlzR9jkIDBeaFhlVs/YNpMHLqXF6qbwfnfT++nFNny/SHXv 65Gz7/3oPaTAl/CxEOMpIq6Xoerte9jyv5ZB1Szk4NTuvgTQE4P68Jsqb7XGipUe 2BlZ+ttf6KbS7v4ZW0d3hChGkZJRrmmlpKy29Ud+A6hT4h+jCgkRfDKeWsfCfjeM ZwrudyfO5l1s50yWkLUiOA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1704240792; x= 1704327192; bh=CHSlHTiOI1tOacXhwl4Ru5eU9RGrGgjI35KovkRZWuk=; b=C S447M8f2dujKqsTUwvIj7+Khy49YCW9OYppRtItjXkSshGWlQshujtJMV3Z+hUPP fyFoP8iGsrp7D9zeAEl9aBO6tYTKd1qcOKfQFORtAOMrrr0ceY3WJ3Lw+0Z12Ft0 z08ucLorV9UvXYr0UqXVazlur4/Oc5YwfS/v4O4UhhJj4tSRtWMpe8vnwv25Du35 ipyhY5zKvhGUyvUTEj492RXCqrjKRU95hQeKClLquh7kW2S2jx5f5rPnqm6yXc7n wRxeejOK6NDxOB9NISn2bk1gR3D7R9hRFP2gj8DBfqNPyItigvcgRXpvHY4fLx4Z jH/bZQENQIQBnbKraDJVg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdeggedgudelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepteduleejgeehtefgheegjeekueehvdevieekueeftddvtdevfefhvdevgedu jeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 2 Jan 2024 19:13:11 -0500 (EST) Content-Language: en-US In-Reply-To: <83v88bzwx0.fsf@gnu.org> 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:277262 Archived-At: Version: 30.1 On 02/01/2024 15:28, Eli Zaretskii wrote: >> Date: Tue, 2 Jan 2024 15:10:53 +0200 >> Cc: 68174@debbugs.gnu.org, juri@linkov.net >> From: Dmitry Gutov >> >> On 02/01/2024 10:55, Sean Whitton wrote: >>>> This particular case though seems fixed with this patch, please test: >>>> >>>> diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el >>>> index 3cd835a9d6b..82051740b8f 100644 >>>> --- a/lisp/vc/vc.el >>>> +++ b/lisp/vc/vc.el >>>> @@ -1074,6 +1074,7 @@ vc-expand-dirs >>>> >>>> (defvar vc-dir-backend) >>>> (defvar log-view-vc-backend) >>>> +(defvar log-view-vc-fileset) >>>> (defvar log-edit-vc-backend) >>>> (defvar diff-vc-backend) >>>> (defvar diff-vc-revisions) >>>> @@ -1155,6 +1156,8 @@ vc-deduce-fileset >>>> (vc-state buffer-file-name) >>>> (vc-checkout-model backend buffer-file-name)) >>>> (list backend (list buffer-file-name)))) >>>> + ((derived-mode-p 'log-view-mode) >>>> + (list log-view-vc-backend log-view-vc-fileset)) >>>> ((and (buffer-live-p vc-parent-buffer) >>>> ;; FIXME: Why this test? --Stef >>>> (or (buffer-file-name vc-parent-buffer) >>> Yup, that works, thanks! >> >> Very good. >> >> Eli, do you think we could add this to emacs-29 as well? >> >> It would help the users of 29.2 avoid the described bug when/if they >> upgrade to the latest project.el. Probably not very urgent, but OTOH the >> change looks pretty safe. > > If it's safe, you'd need to convince me. Because just by looking at > it, I don't have a clear idea what else it could affect. It's not a trivial transformation, but it's semantically sound: log-view-mode saves -- or one might say caches -- the backend and the fileset in its own variables locally (referenced in the diff above). The commands in log-view.el (of which there are several) use those vars rather than look up vc-parent-buffer, so the values should be correct. > And the use > case is pretty rare, AFAICT. So I tend to be happier with this on > master. Ok, I'll push it to master for now.