GNU bug report logs - #68364
Print log buttons fail with vc-log-mergebase

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Wed, 10 Jan 2024 07:33:01 UTC

Severity: normal

Fixed in version 30.0.50

Done: Juri Linkov <juri <at> linkov.net>

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 68364 in the body.
You can then email your comments to 68364 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 dmitry <at> gutov.dev, bug-gnu-emacs <at> gnu.org:
bug#68364; Package emacs. (Wed, 10 Jan 2024 07:33:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Juri Linkov <juri <at> linkov.net>:
New bug report received and forwarded. Copy sent to dmitry <at> gutov.dev, bug-gnu-emacs <at> gnu.org. (Wed, 10 Jan 2024 07:33:01 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: bug-gnu-emacs <at> gnu.org
Subject: Print log buttons fail with vc-log-mergebase
Date: Wed, 10 Jan 2024 09:28:13 +0200
Buttons to show more log entries is a nice feature,
but after the recent change this doesn't work with
'C-x v M L' (vc-log-mergebase):

  Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p "branch-2")
    vc-print-log-setup-buttons("branch-1" t "branch-2" nil)

Probably it requires a special handling for 'C-x v M L'.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68364; Package emacs. (Wed, 10 Jan 2024 13:57:03 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Juri Linkov <juri <at> linkov.net>, 68364 <at> debbugs.gnu.org
Subject: Re: bug#68364: Print log buttons fail with vc-log-mergebase
Date: Wed, 10 Jan 2024 15:18:26 +0200
Hi Juri,

On 10/01/2024 09:28, Juri Linkov wrote:
> Buttons to show more log entries is a nice feature,
> but after the recent change this doesn't work with
> 'C-x v M L' (vc-log-mergebase):
> 
>    Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p "branch-2")
>      vc-print-log-setup-buttons("branch-1" t "branch-2" nil)
> 
> Probably it requires a special handling for 'C-x v M L'.

Does this help?

Looks like the description of the LIMIT argument wasn't updated in the 
vc-print-log-internal's docstring, when it started to be a string sometimes.

diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index b8cc44fc3dc..7d5a5486250 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -2711,7 +2711,7 @@ vc-print-log-setup-buttons
   ;; In either case only one revision is wanted, no buttons.
   (when (and limit (not (eq 'limit-unsupported pl-return))
              (not (and is-start-revision
-                       (= limit 1))))
+                       (eql limit 1))))
     (let ((entries 0))
       (goto-char (point-min))
       (while (re-search-forward log-view-message-re nil t)





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68364; Package emacs. (Wed, 10 Jan 2024 17:22:03 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: Dmitry Gutov <dmitry <at> gutov.dev>
Cc: 68364 <at> debbugs.gnu.org
Subject: Re: bug#68364: Print log buttons fail with vc-log-mergebase
Date: Wed, 10 Jan 2024 19:20:05 +0200
>> Buttons to show more log entries is a nice feature,
>> but after the recent change this doesn't work with
>> 'C-x v M L' (vc-log-mergebase):
>>    Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p
>> "branch-2")
>>      vc-print-log-setup-buttons("branch-1" t "branch-2" nil)
>> Probably it requires a special handling for 'C-x v M L'.
>
> Does this help?
>
> Looks like the description of the LIMIT argument wasn't updated in the
> vc-print-log-internal's docstring, when it started to be a string
> sometimes.

The description of the LIMIT argument in vc-print-log-internal looks strange:

  "Show up to LIMIT entries (non-nil means unlimited)."

Maybe it should be "(nil means unlimited)"?

> diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
> index b8cc44fc3dc..7d5a5486250 100644
> --- a/lisp/vc/vc.el
> +++ b/lisp/vc/vc.el
> @@ -2711,7 +2711,7 @@ vc-print-log-setup-buttons
>    ;; In either case only one revision is wanted, no buttons.
>    (when (and limit (not (eq 'limit-unsupported pl-return))
>               (not (and is-start-revision
> -                       (= limit 1))))
> +                       (eql limit 1))))
>      (let ((entries 0))
>        (goto-char (point-min))
>        (while (re-search-forward log-view-message-re nil t)

Sorry, still fails on another line:

      (if (< entries limit)

But this works:

diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index b8cc44fc3dc..d284b19fcf0 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -2709,7 +2709,8 @@ vc-print-log-setup-buttons
   ;; LIMIT=1 is set by vc-annotate-show-log-revision-at-line
   ;; or by vc-print-root-log with current-prefix-arg=1.
   ;; In either case only one revision is wanted, no buttons.
-  (when (and limit (not (eq 'limit-unsupported pl-return))
+  (when (and limit (not (stringp limit))
+             (not (eq 'limit-unsupported pl-return))
              (not (and is-start-revision
                        (= limit 1))))
     (let ((entries 0))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68364; Package emacs. (Wed, 10 Jan 2024 23:24:02 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Juri Linkov <juri <at> linkov.net>
Cc: 68364 <at> debbugs.gnu.org
Subject: Re: bug#68364: Print log buttons fail with vc-log-mergebase
Date: Thu, 11 Jan 2024 01:23:08 +0200
On 10/01/2024 19:20, Juri Linkov wrote:
>>> Buttons to show more log entries is a nice feature,
>>> but after the recent change this doesn't work with
>>> 'C-x v M L' (vc-log-mergebase):
>>>     Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p
>>> "branch-2")
>>>       vc-print-log-setup-buttons("branch-1" t "branch-2" nil)
>>> Probably it requires a special handling for 'C-x v M L'.
>>
>> Does this help?
>>
>> Looks like the description of the LIMIT argument wasn't updated in the
>> vc-print-log-internal's docstring, when it started to be a string
>> sometimes.
> 
> The description of the LIMIT argument in vc-print-log-internal looks strange:
> 
>    "Show up to LIMIT entries (non-nil means unlimited)."
> 
> Maybe it should be "(nil means unlimited)"?

Probably. And a mention of allowed string values.

>> diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
>> index b8cc44fc3dc..7d5a5486250 100644
>> --- a/lisp/vc/vc.el
>> +++ b/lisp/vc/vc.el
>> @@ -2711,7 +2711,7 @@ vc-print-log-setup-buttons
>>     ;; In either case only one revision is wanted, no buttons.
>>     (when (and limit (not (eq 'limit-unsupported pl-return))
>>                (not (and is-start-revision
>> -                       (= limit 1))))
>> +                       (eql limit 1))))
>>       (let ((entries 0))
>>         (goto-char (point-min))
>>         (while (re-search-forward log-view-message-re nil t)
> 
> Sorry, still fails on another line:
> 
>        (if (< entries limit)
> 
> But this works:
> 
> diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
> index b8cc44fc3dc..d284b19fcf0 100644
> --- a/lisp/vc/vc.el
> +++ b/lisp/vc/vc.el
> @@ -2709,7 +2709,8 @@ vc-print-log-setup-buttons
>     ;; LIMIT=1 is set by vc-annotate-show-log-revision-at-line
>     ;; or by vc-print-root-log with current-prefix-arg=1.
>     ;; In either case only one revision is wanted, no buttons.
> -  (when (and limit (not (eq 'limit-unsupported pl-return))
> +  (when (and limit (not (stringp limit))
> +             (not (eq 'limit-unsupported pl-return))
>                (not (and is-start-revision
>                          (= limit 1))))
>       (let ((entries 0))

That would mean the "follow renames" button is never shown in 
vc-log-mergebase outputs.

I've pushed commit 1ecb53ad2fc, check it out.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68364; Package emacs. (Thu, 11 Jan 2024 07:12:02 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: Dmitry Gutov <dmitry <at> gutov.dev>
Cc: 68364 <at> debbugs.gnu.org
Subject: Re: bug#68364: Print log buttons fail with vc-log-mergebase
Date: Thu, 11 Jan 2024 09:06:39 +0200
close 68364 30.0.50
thanks

> That would mean the "follow renames" button is never shown in
> vc-log-mergebase outputs.

I don't know if this button makes sense in vc-log-mergebase outputs.
But in file logs it works nicely, much better than using
vc-git-print-log-follow.

> I've pushed commit 1ecb53ad2fc, check it out.

Thanks for taking care of this.  I confirm there are no problems anymore.




bug marked as fixed in version 30.0.50, send any further explanations to 68364 <at> debbugs.gnu.org and Juri Linkov <juri <at> linkov.net> Request was from Juri Linkov <juri <at> linkov.net> to control <at> debbugs.gnu.org. (Thu, 11 Jan 2024 07:12:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68364; Package emacs. (Thu, 11 Jan 2024 13:11:02 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Juri Linkov <juri <at> linkov.net>
Cc: 68364 <at> debbugs.gnu.org
Subject: Re: bug#68364: Print log buttons fail with vc-log-mergebase
Date: Thu, 11 Jan 2024 15:10:36 +0200
On 11/01/2024 09:06, Juri Linkov wrote:
> close 68364 30.0.50
> thanks
> 
>> That would mean the "follow renames" button is never shown in
>> vc-log-mergebase outputs.
> 
> I don't know if this button makes sense in vc-log-mergebase outputs.

It's probably less important than in the full log, but the mergebase log 
interval might contain renames too, I think.

> But in file logs it works nicely, much better than using
> vc-git-print-log-follow.

Good to hear!

>> I've pushed commit 1ecb53ad2fc, check it out.
> 
> Thanks for taking care of this.  I confirm there are no problems anymore.

Thanks.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 09 Feb 2024 12:24:15 GMT) Full text and rfc822 format available.

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

Previous Next


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