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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 50258 in the body.
You can then email your comments to 50258 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#50258; Package emacs. (Sun, 29 Aug 2021 21:09:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dmitry Gutov <dgutov <at> yandex.ru>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 29 Aug 2021 21:09:02 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: bug-gnu-emacs <at> gnu.org
Subject: Don't call (vc-find-backend-function backend 'merge) [svn/cvs/rcs]
Date: Mon, 30 Aug 2021 00:08:44 +0300
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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50258; Package emacs. (Mon, 22 Aug 2022 16:02:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 50258 <at> debbugs.gnu.org
Subject: Re: bug#50258: Don't call (vc-find-backend-function backend 'merge)
 [svn/cvs/rcs]
Date: Mon, 22 Aug 2022 18:00:58 +0200
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?





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50258; Package emacs. (Mon, 22 Aug 2022 23:29:02 GMT) Full text and rfc822 format available.

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50258; Package emacs. (Tue, 23 Aug 2022 10:40:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Dmitry Gutov <dgutov <at> yandex.ru>
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 12:38:53 +0200
Dmitry Gutov <dgutov <at> 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.




Reply sent to Dmitry Gutov <dgutov <at> yandex.ru>:
You have taken responsibility. (Wed, 24 Aug 2022 22:17:02 GMT) Full text and rfc822 format available.

Notification sent to Dmitry Gutov <dgutov <at> yandex.ru>:
bug acknowledged by developer. (Wed, 24 Aug 2022 22:17:02 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 50258-done <at> debbugs.gnu.org
Subject: Re: bug#50258: Don't call (vc-find-backend-function backend 'merge)
 [svn/cvs/rcs]
Date: Thu, 25 Aug 2022 01:16:47 +0300
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.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 22 Sep 2022 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 210 days ago.

Previous Next


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