GNU bug report logs - #35624
log-view-diff regression

Previous Next

Package: emacs;

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

Date: Tue, 7 May 2019 22:02:02 UTC

Severity: normal

Tags: patch

Found in version 26.1

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

Bug is archived. No further changes may be made.

Full log


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

From: Juri Linkov <juri <at> linkov.net>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 35624 <at> debbugs.gnu.org
Subject: Re: bug#35624: log-view-diff regression
Date: Thu, 09 May 2019 22:41:15 +0300
[Message part 1 (text/plain, inline)]
found 35624 26.1
tags 35624 + patch
quit

>> This is exactly what was my initial thought, but this is a wrong fix,
>> as I realized later.
>
> Okay, let's work on it.
>
> I do want to just commit that patch first, since it was obviously the idea
> behind the previous change.

Since it's wrong in any case, better to revert it altogether in emacs-26.

>> I also tried
>>
>>    (not (re-search-forward log-view-message-re nil t))
>>
>> but it seems this is impossible to do because currently
>> log-view.el doesn't support the notion of the end of
>> the last revision expanded body.
>
> The other option is check whether all lines between the point and EOB are
> either empty of start with "Show 2X entries". Which is a design I don't
> particularly like, but it could serve your goal.

Actually there is the much needed function log-view-inside-comment-p
for expanded comments, and this patch correctly handles all cases:

[log-view-diff-message.patch (text/x-diff, inline)]
diff --git a/lisp/vc/log-view.el b/lisp/vc/log-view.el
index e47fad8908..f7aeacc273 100644
--- a/lisp/vc/log-view.el
+++ b/lisp/vc/log-view.el
@@ -618,10 +618,11 @@ log-view-diff-common
     ;; When TO and FR are the same, or when point is on a line after
     ;; the last entry, look at the previous revision.
     (when (or (string-equal fr to)
-              (>= (point)
-                  (save-excursion
-                    (goto-char (car fr-entry))
-                    (forward-line))))
+              (and (not (log-view-inside-comment-p end))
+                   (save-excursion
+                     (goto-char end)
+                     (beginning-of-line)
+                     (not (re-search-forward log-view-message-re nil t)))))
       (setq fr (vc-call-backend log-view-vc-backend 'previous-revision nil fr)))
     (vc-diff-internal
      t (list log-view-vc-backend

This bug report was last modified 5 years and 336 days ago.

Previous Next


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