GNU bug report logs - #39704
28.0.50; vc-print-branch-log data loss

Previous Next

Package: emacs;

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

Date: Fri, 21 Feb 2020 00:11:02 UTC

Severity: normal

Tags: fixed, patch

Fixed in version 28.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 39704 in the body.
You can then email your comments to 39704 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#39704; Package emacs. (Fri, 21 Feb 2020 00:11:02 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 bug-gnu-emacs <at> gnu.org. (Fri, 21 Feb 2020 00:11:02 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: 28.0.50; vc-print-branch-log data loss
Date: Fri, 21 Feb 2020 01:32:35 +0200
Tags: patch

Accidentally I noticed that vc-print-branch-log prints a narrower log
than it should.  I don't remember any damage from this data loss
but this is not the right thing to do - by default it should show logs
from the repository root, not logs limited to a subdirectory when
this command happens to be called from a subdirectory.

Am I correct to expect that vc-print-branch-log should print
log from branch's root like vc-print-root-log does, and
not from a subdirectory like vc-print-log does?

diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index f7d651fac6..13d60b6fcf 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -2559,9 +2590,11 @@ vc-print-branch-log
     (vc-read-revision "Branch to log: ")))
   (when (equal branch "")
     (error "No branch specified"))
-  (vc-print-log-internal (vc-responsible-backend default-directory)
-                         (list default-directory) branch t
-                         (when (> vc-log-show-limit 0) vc-log-show-limit)))
+  (let* ((backend (vc-responsible-backend default-directory))
+         (rootdir (vc-call-backend backend 'root default-directory)))
+    (vc-print-log-internal backend
+                           (list rootdir) branch t
+                           (when (> vc-log-show-limit 0) vc-log-show-limit))))
 
 ;;;###autoload
 (defun vc-log-incoming (&optional remote-location)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39704; Package emacs. (Fri, 21 Feb 2020 00:26:02 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Juri Linkov <juri <at> linkov.net>, 39704 <at> debbugs.gnu.org
Cc: Tom Tromey <tom <at> tromey.com>
Subject: Re: bug#39704: 28.0.50; vc-print-branch-log data loss
Date: Fri, 21 Feb 2020 02:25:21 +0200
On 21.02.2020 1:32, Juri Linkov wrote:
> Tags: patch
> 
> Accidentally I noticed that vc-print-branch-log prints a narrower log
> than it should.  I don't remember any damage from this data loss
> but this is not the right thing to do - by default it should show logs
> from the repository root, not logs limited to a subdirectory when
> this command happens to be called from a subdirectory.
> 
> Am I correct to expect that vc-print-branch-log should print
> log from branch's root like vc-print-root-log does, and
> not from a subdirectory like vc-print-log does?

I think so (then, the patch LGTM).

Tom might want to weigh in on this, though.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39704; Package emacs. (Fri, 21 Feb 2020 18:30:02 GMT) Full text and rfc822 format available.

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

From: Tom Tromey <tom <at> tromey.com>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: Tom Tromey <tom <at> tromey.com>, 39704 <at> debbugs.gnu.org,
 Juri Linkov <juri <at> linkov.net>
Subject: Re: bug#39704: 28.0.50; vc-print-branch-log data loss
Date: Fri, 21 Feb 2020 11:29:22 -0700
Dmitry> Tom might want to weigh in on this, though.

I don't really have an opinion.
The proposed behavior seems fine to me.

Tom




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39704; Package emacs. (Sun, 23 Feb 2020 00:45:04 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: Tom Tromey <tom <at> tromey.com>, 39704 <at> debbugs.gnu.org
Subject: Re: bug#39704: 28.0.50; vc-print-branch-log data loss
Date: Sun, 23 Feb 2020 02:07:10 +0200
>> Accidentally I noticed that vc-print-branch-log prints a narrower log
>> than it should.  I don't remember any damage from this data loss
>> but this is not the right thing to do - by default it should show logs
>> from the repository root, not logs limited to a subdirectory when
>> this command happens to be called from a subdirectory.
>> Am I correct to expect that vc-print-branch-log should print
>> log from branch's root like vc-print-root-log does, and
>> not from a subdirectory like vc-print-log does?
>
> I think so (then, the patch LGTM).

Or maybe retain the old behavior on using a prefix arg?

I.e. C-u M-x vc-print-branch-log could ask for a directory,
with the default on default-directory.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39704; Package emacs. (Sun, 23 Feb 2020 08:58:01 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Juri Linkov <juri <at> linkov.net>
Cc: Tom Tromey <tom <at> tromey.com>, 39704 <at> debbugs.gnu.org
Subject: Re: bug#39704: 28.0.50; vc-print-branch-log data loss
Date: Sun, 23 Feb 2020 10:57:19 +0200
On 23.02.2020 2:07, Juri Linkov wrote:
> Or maybe retain the old behavior on using a prefix arg?
> 
> I.e. C-u M-x vc-print-branch-log could ask for a directory,
> with the default on default-directory.

Personally, I don't remember needing something like that (or, in a 
once-a-decade occurrence, I can use the console). But if you find it 
useful, sure.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39704; Package emacs. (Mon, 09 Mar 2020 23:36:01 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: Tom Tromey <tom <at> tromey.com>, 39704 <at> debbugs.gnu.org
Subject: Re: bug#39704: 28.0.50; vc-print-branch-log data loss
Date: Tue, 10 Mar 2020 01:34:37 +0200
tags 39704 fixed
close 39704 28.0.50
quit

>> Or maybe retain the old behavior on using a prefix arg?
>> I.e. C-u M-x vc-print-branch-log could ask for a directory,
>> with the default on default-directory.
>
> Personally, I don't remember needing something like that (or, in
> a once-a-decade occurrence, I can use the console). But if you find it 
> useful, sure.

Ok, pushed to master, and closed.




Added tag(s) fixed. Request was from Juri Linkov <juri <at> linkov.net> to control <at> debbugs.gnu.org. (Mon, 09 Mar 2020 23:36:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.0.50, send any further explanations to 39704 <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. (Mon, 09 Mar 2020 23:36:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 07 Apr 2020 11:24:04 GMT) Full text and rfc822 format available.

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

Previous Next


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