GNU bug report logs - #50258
Don't call (vc-find-backend-function backend 'merge) [svn/cvs/rcs]

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dgutov <at> yandex.ru>

Date: Sun, 29 Aug 2021 21:09:02 UTC

Severity: normal

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 50258 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 50258 <at> debbugs.gnu.org
Subject: Re: bug#50258: Don't call (vc-find-backend-function backend 'merge)
 [svn/cvs/rcs]
Date: Tue, 23 Aug 2022 02:28:36 +0300
On 22.08.2022 19:00, Lars Ingebrigtsen wrote:
> Dmitry Gutov<dgutov <at> yandex.ru>  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))




This bug report was last modified 2 years and 332 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.