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#50258: Don't call (vc-find-backend-function backend 'merge) [svn/cvs/rcs] Date: Tue, 23 Aug 2022 02:28:36 +0300 Message-ID: <2b390ac0-e121-d485-983d-1bc4673864d4@yandex.ru> References: <87fsho2rph.fsf@gnus.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="12828"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Cc: 50258@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 23 01:39:15 2022 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 1oQH0j-0003C8-E4 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 23 Aug 2022 01:39:13 +0200 Original-Received: from localhost ([::1]:56262 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oQH0h-0004NL-5k for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 22 Aug 2022 19:39:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37782) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQGqt-000894-2E for bug-gnu-emacs@gnu.org; Mon, 22 Aug 2022 19:29:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52257) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oQGqs-0006Sb-Mw for bug-gnu-emacs@gnu.org; Mon, 22 Aug 2022 19:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oQGqs-0001rU-9E for bug-gnu-emacs@gnu.org; Mon, 22 Aug 2022 19:29:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 22 Aug 2022 23:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50258 X-GNU-PR-Package: emacs Original-Received: via spool by 50258-submit@debbugs.gnu.org id=B50258.16612109297134 (code B ref 50258); Mon, 22 Aug 2022 23:29:02 +0000 Original-Received: (at 50258) by debbugs.gnu.org; 22 Aug 2022 23:28:49 +0000 Original-Received: from localhost ([127.0.0.1]:42006 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQGqe-0001r0-MQ for submit@debbugs.gnu.org; Mon, 22 Aug 2022 19:28:48 -0400 Original-Received: from mail-wr1-f53.google.com ([209.85.221.53]:41835) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQGqa-0001qk-Bn for 50258@debbugs.gnu.org; Mon, 22 Aug 2022 19:28:47 -0400 Original-Received: by mail-wr1-f53.google.com with SMTP id h24so15007748wrb.8 for <50258@debbugs.gnu.org>; Mon, 22 Aug 2022 16:28:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc; bh=OVOspP6oCtJRAURsUFCZPHc1mOP+2aELtK2ZT7/GAJw=; b=mXbkiLZMPAKeXsTAnOKCEk+hSZCFIcq2I+BnFLJw6UOCd7aZ1A//ni/nMrxGesGkrT epL1x/uugdBqsmZDsgnFJvf4yF5m3TiPA2JlVqmdanST18HlZiRWuMfSbM0BwLRHUvC+ pt99mf66S72bXhKjM8XAHE2MYa5yLQnKUnlZL1W8G434tue1mWsKdmom4wEZYRMtPtLg 5OJc+oaP00Mil0vd28DIVQt+RpVZ4XQHo+TLeLfaEMmDFCnS+skftQYjOogZYdSZn3tZ tuSgbxRYR/H8K7yCa7H/m9tcrIRruJcK54TOKnPhWVMyiTL/FZue1D5ej6iO8REe/NtN Nogg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc; bh=OVOspP6oCtJRAURsUFCZPHc1mOP+2aELtK2ZT7/GAJw=; b=rLOrPOX8rYgmncghn4oBQqXcK1S0WkBxGUbH/7iahJMnM8MEEWE2JrbdCoywg4RMw0 nS28SdKBWDAxWqX6PW9CgC31vH4u0xofFiDNmcnpC0H1EuE0MuePr2zY0vXTdecUdO1+ ynI/zqx/9A9sQPRd4jKI06xo2QtE4BfG/n6Cunv69f1VebON+wgfUEec3t58ot7eai/3 PQ38SpEs1c/td7WdyQcSEvlbD34WDf3tAVAG+q1Qg6ch4dNYYdJEQxSIx/4kFTCdWTdJ oqm9PRKesQE+kdxDzw64/b67K5iHr7EH0O5q+uGr/E1AAO0tmvp6cPY3QWfScLvlq0jO Q4oQ== X-Gm-Message-State: ACgBeo3ebHekSsmABIXCbgcfyyB69pC3Dp6qybKVdc6xWqWCnfxwnlAH EYhLZs1FgkhhjzhnuKInK/M= X-Google-Smtp-Source: AA6agR5SqZsHImzhh2a6QwKojC1EKSaV2oj7/WuTQxNBPqbi24V08aP6kQKGE76y+5VOA72UMEhj7g== X-Received: by 2002:a05:6000:2c1:b0:225:4999:bea4 with SMTP id o1-20020a05600002c100b002254999bea4mr6441494wry.241.1661210918345; Mon, 22 Aug 2022 16:28:38 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id j18-20020a05600c191200b003a5c1e916c8sm134170wmq.1.2022.08.22.16.28.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Aug 2022 16:28:38 -0700 (PDT) Content-Language: en-US In-Reply-To: <87fsho2rph.fsf@gnus.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" Xref: news.gmane.io gmane.emacs.bugs:240480 Archived-At: On 22.08.2022 19:00, Lars Ingebrigtsen wrote: > Dmitry Gutov writes: > >> vc-merge should call (vc-find-backend-function backend 'merge-file) instead. >> >> The change is trivial, but someone with any of the VCS listed above >> installed should test it. > I could test it -- did you have any particular test scenario in mind? > Or are there test cases for this in vc-tests.el? No, no tests. A scenario would be some situation where using vc-merge makes sense. I don't really remember how branches worked in SVN, much less CVS or RCS to write this step by step. Maybe testing is not even necessary: the change I'm proposing seems like a no-brainer, it just removes the requirement for the 'merge' backend methods to be defined (in per-file backends). No code uses them directly anyway. diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index d3e53858c1..3274f1ec9d 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -2294,7 +2294,7 @@ vc-merge ((vc-find-backend-function backend 'merge-branch) (vc-call-backend backend 'merge-branch)) ;; Otherwise, do a per-file merge. - ((vc-find-backend-function backend 'merge) + ((vc-find-backend-function backend 'merge-file) (vc-buffer-sync) (dolist (file files) (let* ((state (vc-state file))