From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Sean Whitton Newsgroups: gmane.emacs.bugs Subject: bug#64055: [WIP Patch] Enable editing commit messages - vc-git-modify-change-comment Date: Sun, 20 Oct 2024 08:56:12 +0800 Message-ID: <87ldyjvbgz.fsf@melete.silentflame.com> References: <87pm5yo4m7.fsf@gmail.com> <87legmnq4l.fsf@gmail.com> <87r090o8cl.fsf@melete.silentflame.com> <874j5vgypf.fsf@melete.silentflame.com> <787fb692-db24-4682-871b-5a52d31a1249@gutov.dev> <87ed4obs1b.fsf@melete.silentflame.com> <87o73sad24.fsf@melete.silentflame.com> <877ca63ln5.fsf@melete.silentflame.com> <86r08enfri.fsf@gnu.org> <87cyjyvsns.fsf@melete.silentflame.com> <868qulojrx.fsf@gnu.org> <87zfn1vjvb.fsf@melete.silentflame.com> <864j59ob91.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36099"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Morgan.J.Smith@outlook.com, rpluim@gmail.com, 64055@debbugs.gnu.org, dmitry@gutov.dev To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Oct 20 02:57:00 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 1t2KFf-0009FA-7A for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 20 Oct 2024 02:56:59 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t2KFM-00057x-D6; Sat, 19 Oct 2024 20:56:40 -0400 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 1t2KFK-00057Z-0t for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2024 20:56:38 -0400 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 1t2KFJ-0001i3-PA for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2024 20:56:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=fS5ZqMjNW3wU550qB84RH0EA4/B6yJPrpaLY9CspjFI=; b=kmGp/QsHS7/Gp8lpGUMr8BELKIsVEHO6NHYSbklEEH2mcmatb9F3EyS/Z4ZdAZyK/pafxJAHyXcapKuKbSoCehCuC35MRHGLMi5KHqZneztOLN9+8GPZnT+7ZfB3MkWsKtic/p7wIyVGRmbgjxNJbkLgCmfK1BX/E1Foz9IIjFXb2ZyJzSIdPP4M/lDbGHlpsg+H9Rs0hUil5R/lvGs7N3b9SKB8UxqDP/wLcqTe6bFFG9VE4OBdmctO6pPs2GPIMBQJ24n7EAVXgPugFjCcujWgDTnFcogmwZbkyq4GyI7aSigVFBrieMElwJ6n11PCe7qQpF2h14Kmbdl0st2Dww==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t2KFh-0006TW-UN for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2024 20:57:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 20 Oct 2024 00:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64055 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 64055-submit@debbugs.gnu.org id=B64055.172938580824867 (code B ref 64055); Sun, 20 Oct 2024 00:57:01 +0000 Original-Received: (at 64055) by debbugs.gnu.org; 20 Oct 2024 00:56:48 +0000 Original-Received: from localhost ([127.0.0.1]:45191 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t2KFU-0006T1-31 for submit@debbugs.gnu.org; Sat, 19 Oct 2024 20:56:48 -0400 Original-Received: from sendmail.purelymail.com ([34.202.193.197]:46092) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t2KFS-0006Sj-Ba for 64055@debbugs.gnu.org; Sat, 19 Oct 2024 20:56:47 -0400 DKIM-Signature: a=rsa-sha256; b=ODHl7AhC6GVq+tbMgecoPOF2MyKZJP/W7MlW/3FWKnnhs7zCdun0lTMmp+Orw9iQEEspl0P3JTg7NHu5DjJ2c9qKW+J4DwnJG9eKswsuP28NiVNejbU5cqi3NvWK215JQNS6wPCEO1eS5Y+kWbRvNpGlaOSFUlBZKjQgo1IS0is+98ZymW69QO95wPo+8IvIbbJ3fSAnWOLfPtJrrVEUONZZdEaDsVQrwG9ryKV7Os7mzUhI0zdZd3R0sMQKJVbzlUbH+YuDU0ErjJwues3ojFv1VqUKAuskc9VJE9UUPjWTJjaHcmRdPYfzXHuThh7SCVFiH7XWzuDB8pONMiT2pA==; s=purelymail1; d=spwhitton.name; v=1; bh=C/9OwYwy81tKIQiOvBiQoYHzyW07TkA/7v4dQ6CbnSQ=; h=Received:Received:From:To:Subject:Date; DKIM-Signature: a=rsa-sha256; b=Inz4oNhVNf9Prea0djWj+CM+CmrCbUyc81garziH8ykKHrcQXS6HquLtmBBC/yrBCiBOVISxbuko2U6TMEi74Xq+Hg4SdkLLUAM8gsLlNEUIMbu0lZMWulgy5QyGEoFgDSkwJXrV7Hf1lt1F1+4DK63tkPoFpY/FaM4zopaUrLg/PDSrJP1Fh2qsHPLLgGCxFUGdIR50W4Dg51UFTWsdWqE789++hrvk8dtsv5BaEKu79tgbrQ07TE9ahSh+UHgoI2Nd7TdpO8vjQsXUsSUzDeNVqeJM+JGTq4oKTyisqOSR4WfrINsKf9hA+X7laqK3vqQErOYSnxEVf7CB2yUdYw==; s=purelymail1; d=purelymail.com; v=1; bh=C/9OwYwy81tKIQiOvBiQoYHzyW07TkA/7v4dQ6CbnSQ=; h=Feedback-ID:Received:Received:From:To:Subject:Date; Feedback-ID: 20115:3760:null:purelymail X-Pm-Original-To: 64055@debbugs.gnu.org Original-Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id -1124431599; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Sun, 20 Oct 2024 00:56:15 +0000 (UTC) Original-Received: by melete.silentflame.com (Postfix, from userid 1000) id 8A85D7E8333; Sun, 20 Oct 2024 08:56:12 +0800 (CST) In-Reply-To: <864j59ob91.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 18 Oct 2024 15:18:18 +0300") 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:293918 Archived-At: Hello, On Fri 18 Oct 2024 at 03:18pm +03, Eli Zaretskii wrote: >> From: Sean Whitton >> Cc: 64055@debbugs.gnu.org, Morgan.J.Smith@outlook.com, rpluim@gmail.com, >> dmitry@gutov.dev >> Date: Fri, 18 Oct 2024 17:30:16 +0800 >> >> The main point is that parsing text out of the log view buffer is much >> more error-prone. For example, with a non-distributed VCS like CVS, >> what if someone else has edited the comment in the meantime? It makes >> sense to fetch the latest known version instead of relying on buffer >> text. > > Now I'm confused: didn't you just tell me that CVS already had this > implemented, without ever needing the new backend method? How do we > solve this problem in the CVS case without risking the errors? What > you say above seems to tell that we do need an implementation of this > method for CVS as well, no? Or what am I missing? > >> So, I hope that we will eventually completely replace >> log-view-extract-comment. > > So you do agree with me that we should have this implemented for other > backends, and the sooner the better? The VC design principle here is that commands should be implemented for more than one version control system, in part because that way we ensure they really are general version control user operations, and not something parochial to the way a particular VCS sees the world. In the context of this bug, the relevant command for this design principle is log-view-modify-change-comment. Previously, that command worked only for src, rcs, sccs, cvs and svn, and partly for Hg. Soon it will also work for git. So, the design principle is respected. On the other hand, the design principle doesn't apply directly to the new get-change-comment backend action, because src, rcs, sccs, cvs and svn do not *require* an implementation of get-change-comment in order for the log-view-modify-change-comment command to work, so far as I understand it -- otherwise the feature would not have been implemented the way it is, or we'd have bug reports. Git, I think, does require an implementation of get-change-comment, or at least, I concluded that it's the most natural way to implement log-view-modify-change-comment for git. In a similar vein, non-distributed VCS require a receive-file backend action, but it would not make sense to write a function vc-git-receive-file. The VC design principle does not apply directly to backend actions. For many backend actions, including get-change-comment, only certain kinds of VCS will require an implementation, in order to support the high-level VC user commands. Nevertheless, although src, rcs, sccs, cvs and svn do not *require* get-change-comment, I think it would be preferable if they did have an implementation, instead of using log-view-extract-comment, for the reasons given previously. But we are talking about changing working code. We should not rush to replace log-view-extract-comment. We can do so incrementally and gradually, and it's low priority. -- Sean Whitton