unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#50258: Don't call (vc-find-backend-function backend 'merge) [svn/cvs/rcs]
@ 2021-08-29 21:08 Dmitry Gutov
  2022-08-22 16:00 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Dmitry Gutov @ 2021-08-29 21:08 UTC (permalink / raw)
  To: 50258

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.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#50258: Don't call (vc-find-backend-function backend 'merge) [svn/cvs/rcs]
  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
  0 siblings, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2022-08-22 16:00 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: 50258

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?






^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#50258: Don't call (vc-find-backend-function backend 'merge) [svn/cvs/rcs]
  2022-08-22 16:00 ` Lars Ingebrigtsen
@ 2022-08-22 23:28   ` Dmitry Gutov
  2022-08-23 10:38     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Dmitry Gutov @ 2022-08-22 23:28 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 50258

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))





^ permalink raw reply related	[flat|nested] 5+ messages in thread

* bug#50258: Don't call (vc-find-backend-function backend 'merge) [svn/cvs/rcs]
  2022-08-22 23:28   ` Dmitry Gutov
@ 2022-08-23 10:38     ` Lars Ingebrigtsen
  2022-08-24 22:16       ` Dmitry Gutov
  0 siblings, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2022-08-23 10:38 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: 50258

Dmitry Gutov <dgutov@yandex.ru> writes:

> I don't really remember how branches worked in SVN, much less CVS or
> RCS to write this step by step.

Yeah, me neither.  :-/

> 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))

I think you should just go ahead and push -- if this turns out to be a
problem in svn/cvs/rcs (which seems unlikely), somebody that uses those
will probably file a bug report in a few years.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#50258: Don't call (vc-find-backend-function backend 'merge) [svn/cvs/rcs]
  2022-08-23 10:38     ` Lars Ingebrigtsen
@ 2022-08-24 22:16       ` Dmitry Gutov
  0 siblings, 0 replies; 5+ messages in thread
From: Dmitry Gutov @ 2022-08-24 22:16 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 50258-done

On 23.08.2022 13:38, Lars Ingebrigtsen wrote:
>> 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))
> I think you should just go ahead and push -- if this turns out to be a
> problem in svn/cvs/rcs (which seems unlikely), somebody that uses those
> will probably file a bug report in a few years.

Makes sense, pushed. Thanks.





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-08-24 22:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2022-08-23 10:38     ` Lars Ingebrigtsen
2022-08-24 22:16       ` Dmitry Gutov

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).