all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 50258@debbugs.gnu.org
Subject: bug#50258: Don't call (vc-find-backend-function backend 'merge) [svn/cvs/rcs]
Date: Tue, 23 Aug 2022 02:28:36 +0300	[thread overview]
Message-ID: <2b390ac0-e121-d485-983d-1bc4673864d4@yandex.ru> (raw)
In-Reply-To: <87fsho2rph.fsf@gnus.org>

On 22.08.2022 19:00, Lars Ingebrigtsen wrote:
> Dmitry Gutov<dgutov@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))





  reply	other threads:[~2022-08-22 23:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-29 21:08 bug#50258: Don't call (vc-find-backend-function backend 'merge) [svn/cvs/rcs] Dmitry Gutov
2022-08-22 16:00 ` Lars Ingebrigtsen
2022-08-22 23:28   ` Dmitry Gutov [this message]
2022-08-23 10:38     ` Lars Ingebrigtsen
2022-08-24 22:16       ` Dmitry Gutov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2b390ac0-e121-d485-983d-1bc4673864d4@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=50258@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.