GNU bug report logs - #5428
vc-annotate for Bzr does not show the date

Previous Next

Package: emacs;

Reported by: Dan Nicolaescu <dann <at> ics.uci.edu>

Date: Wed, 20 Jan 2010 07:29:01 UTC

Severity: wishlist

Tags: fixed, patch

Fixed in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

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 5428 in the body.
You can then email your comments to 5428 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 owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5428; Package emacs. (Wed, 20 Jan 2010 07:29:02 GMT) Full text and rfc822 format available.

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

From: Dan Nicolaescu <dann <at> ics.uci.edu>
To: bug-gnu-emacs <bug-gnu-emacs <at> gnu.org>
Subject: vc-annotate for Bzr does not show the date
Date: Tue, 19 Jan 2010 23:26:49 -0800 (PST)
The subject says it all, dates are not displayed by vc-annotate for bzr.

This is very bad, the date is very useful information.

It is available as a tooltip, but one cannot search for the information
in the tooltip.

What is worse is that this is inconsistent with what vc-annotate does
for all other backends, where the date is shown just fine.

`vc-bzr-annotate-command' goes through a lot of effort to reformat the
vc-annotate buffer with the end result of just hiding the date, and
changing the format of "author". 

The date is in a very compact format YYYYMMDD, so it does not take much
screen space.
If that is a problem we have the
vc-annotate-toggle-annotation-visibility command to hide all the extra
information.

vc-bzr-annotate-command should just limit itself to run the "bzr annotate"
command.  Just vc-bzr-annotate-time needs a minor adjustment to make
everything work.





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5428; Package emacs. (Wed, 20 Jan 2010 16:37:02 GMT) Full text and rfc822 format available.

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

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Dan Nicolaescu <dann <at> ics.uci.edu>
Cc: 5428 <at> debbugs.gnu.org
Subject: Re: vc-annotate for Bzr does not show the date
Date: Wed, 20 Jan 2010 11:36:20 -0500
> The subject says it all, dates are not displayed by vc-annotate for bzr.
>
> This is very bad, the date is very useful information.
>
> It is available as a tooltip, but one cannot search for the information
> in the tooltip.
>
> What is worse is that this is inconsistent with what vc-annotate does
> for all other backends, where the date is shown just fine.

But what's displayed is exactly the same as "bzr annotate" on the tty.

I'd agree that vc-annotate should be consistent across backends, except
that vc-annotate with the SVN backend doesn't show the date either ("svn
annotate" on the tty also does not display the date).




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5428; Package emacs. (Wed, 20 Jan 2010 18:19:02 GMT) Full text and rfc822 format available.

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

From: Dan Nicolaescu <dann <at> ics.uci.edu>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: 5428 <at> debbugs.gnu.org
Subject: Re: vc-annotate for Bzr does not show the date
Date: Wed, 20 Jan 2010 10:18:42 -0800 (PST)
Chong Yidong <cyd <at> stupidchicken.com> writes:

  > > The subject says it all, dates are not displayed by vc-annotate for bzr.
  > >
  > > This is very bad, the date is very useful information.
  > >
  > > It is available as a tooltip, but one cannot search for the information
  > > in the tooltip.
  > >
  > > What is worse is that this is inconsistent with what vc-annotate does
  > > for all other backends, where the date is shown just fine.
  > 
  > But what's displayed is exactly the same as "bzr annotate" on the tty.

The problem is that the command that is actually run is:

bzr annotate --long --all

If you run that from the command line you get the date.  You cannot get
it at all in vc-annotate.

And again this does not change the usefulness of seeing the date.


  > I'd agree that vc-annotate should be consistent across backends, except
  > that vc-annotate with the SVN backend doesn't show the date either ("svn
  > annotate" on the tty also does not display the date).

SVN has an incredibly dumb display for the date in the long form: 

    44 user 2009-10-14 20:48:43 -0700 (Wed, 14 Oct 2009) blah

Probably that's what motivated not to display the date.

Using svn as an argument is not the best idea.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5428; Package emacs. (Wed, 20 Jan 2010 18:21:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: dann <at> ics.uci.edu, 5428 <at> debbugs.gnu.org
Subject: Re: bug#5428: vc-annotate for Bzr does not show the date
Date: Wed, 20 Jan 2010 20:19:56 +0200
> From: Chong Yidong <cyd <at> stupidchicken.com>
> Date: Wed, 20 Jan 2010 11:36:20 -0500
> Cc: 5428 <at> debbugs.gnu.org
> 
> But what's displayed is exactly the same as "bzr annotate" on the tty.

There's a switch to `annotate' that does display the date.




bug reassigned from package 'emacs' to 'emacs,vc'. Request was from Juanma Barranquero <lekktu <at> gmail.com> to control <at> debbugs.gnu.org. (Thu, 21 Jan 2010 12:25:02 GMT) Full text and rfc822 format available.

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5428; Package emacs,vc. (Thu, 21 Jan 2010 14:23:01 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Dan Nicolaescu <dann <at> ics.uci.edu>
Cc: 5428 <at> debbugs.gnu.org
Subject: Re: bug#5428: vc-annotate for Bzr does not show the date
Date: Thu, 21 Jan 2010 09:17:16 -0500
> The date is in a very compact format YYYYMMDD, so it does not take much
> screen space.

In vc-annotate, horizontal space is at a premium, since we're adding
"margin text" to a file who's content should already be expected to be
"using up all space" (e.g. all 80 columns).

I'd oppose adding the date until it can be configured away.


        Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5428; Package emacs,vc. (Thu, 21 Jan 2010 15:29:01 GMT) Full text and rfc822 format available.

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

From: Dan Nicolaescu <dann <at> ics.uci.edu>
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: 5428 <at> debbugs.gnu.org
Subject: Re: bug#5428: vc-annotate for Bzr does not show the date
Date: Thu, 21 Jan 2010 07:27:50 -0800 (PST)
tags 5428 patch
quit

Stefan Monnier <monnier <at> IRO.UMontreal.CA> writes:

  > > The date is in a very compact format YYYYMMDD, so it does not take much
  > > screen space.
  > 
  > In vc-annotate, horizontal space is at a premium, since we're adding
  > "margin text" to a file who's content should already be expected to be
  > "using up all space" (e.g. all 80 columns).

Can you please explain how was this different with CVS (and all other
VCs besides svn)?

If space is so important why isn't hiding the whole annotation
vc-annotate-toggle-annotation-visibility even more useful?

  > I'd oppose adding the date until it can be configured away.

So bzr should be less functional that all other VCs until someone cares
to implement a new feature?

Meanwhile here's a patch for people that want to be able to fully use of
vc-annotate with bzr.  Just removes a bunch of code and adjusts 2 regexps.

Index: vc-bzr.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/vc-bzr.el,v
retrieving revision 1.94
diff -u -3 -p -u -p -r1.94 vc-bzr.el
--- vc-bzr.el	9 Dec 2009 06:04:12 -0000	1.94
+++ vc-bzr.el	21 Jan 2010 15:18:51 -0000
@@ -558,57 +585,25 @@ REV non-nil gets an error."
 Each line is tagged with the revision number, which has a `help-echo'
 property containing author and date information."
   (apply #'vc-bzr-command "annotate" buffer 'async file "--long" "--all"
-         (if revision (list "-r" revision)))
-  (lexical-let ((table (make-hash-table :test 'equal)))
-    (set-process-filter
-     (get-buffer-process buffer)
-     (lambda (proc string)
-       (when (process-buffer proc)
-         (with-current-buffer (process-buffer proc)
-           (setq string (concat (process-get proc :vc-left-over) string))
-           (while (string-match "^\\( *[0-9.]+ *\\) \\([^\n ]+\\) +\\([0-9]\\{8\\}\\)\\( |.*\n\\)" string)
-             (let* ((rev (match-string 1 string))
-                    (author (match-string 2 string))
-                    (date (match-string 3 string))
-                    (key (substring string (match-beginning 0)
-                                    (match-beginning 4)))
-                    (line (match-string 4 string))
-                    (tag (gethash key table))
-                    (inhibit-read-only t))
-               (setq string (substring string (match-end 0)))
-	       (unless tag
-		 (setq tag
-		       (propertize
-			(format "%s %-7.7s" rev author)
-			'help-echo (format "Revision: %d, author: %s, date: %s"
-					   (string-to-number rev)
-					   author date)
-			'mouse-face 'highlight))
-                 (puthash key tag table))
-               (goto-char (process-mark proc))
-               (insert tag line)
-               (move-marker (process-mark proc) (point))))
-           (process-put proc :vc-left-over string)))))))
+         (if revision (list "-r" revision))))
 
 (declare-function vc-annotate-convert-time "vc-annotate" (time))
 
 (defun vc-bzr-annotate-time ()
-  (when (re-search-forward "^ *[0-9.]+ +[^\n ]* +|" nil t)
-    (let ((prop (get-text-property (line-beginning-position) 'help-echo)))
-      (string-match "[0-9]+\\'" prop)
-      (let ((str (match-string-no-properties 0 prop)))
+  (when (re-search-forward "^[0-9.]+ +[^\n ]* +\\([0-9]\\{8\\}\\) |" nil t)
+    (let ((str (match-string-no-properties 1)))
       (vc-annotate-convert-time
        (encode-time 0 0 0
                       (string-to-number (substring str 6 8))
                       (string-to-number (substring str 4 6))
-                      (string-to-number (substring str 0 4))))))))
+                      (string-to-number (substring str 0 4)))))))
 
 (defun vc-bzr-annotate-extract-revision-at-line ()
   "Return revision for current line of annoation buffer, or nil.
 Return nil if current line isn't annotated."
   (save-excursion
     (beginning-of-line)
-    (if (looking-at "^ *\\([0-9.]+\\) +[^\n ]* +|")
+    (if (looking-at "^\\([0-9.]+\\) +[^\n ]* +\\([0-9]\\{8\\}\\) |")
         (match-string-no-properties 1))))
 
 (defun vc-bzr-command-discarding-stderr (command &rest args)




Added tag(s) patch. Request was from Dan Nicolaescu <dann <at> ics.uci.edu> to control <at> debbugs.gnu.org. (Thu, 21 Jan 2010 15:29:02 GMT) Full text and rfc822 format available.

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5428; Package emacs,vc. (Fri, 22 Jan 2010 15:22:01 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Dan Nicolaescu <dann <at> ics.uci.edu>
Cc: 5428 <at> debbugs.gnu.org
Subject: Re: bug#5428: vc-annotate for Bzr does not show the date
Date: Fri, 22 Jan 2010 10:21:28 -0500
> Can you please explain how was this different with CVS (and all other
> VCs besides svn)?

It wasn't.  So it was a problem that wasn't solved for CVS.
Doesn't mean it should be re-introduced for Bzr.

> If space is so important why isn't hiding the whole annotation
> vc-annotate-toggle-annotation-visibility even more useful?

That's another option, although some info is useful to know which lines
were modified at the same time, and which lines where modified
before/after other lines (at least in my experience).

>> I'd oppose adding the date until it can be configured away.
> So bzr should be less functional that all other VCs until someone cares
> to implement a new feature?

I find it more functional, so your characterization is not helpful.


        Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5428; Package emacs,vc. (Fri, 22 Jan 2010 19:27:01 GMT) Full text and rfc822 format available.

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

From: Dan Nicolaescu <dann <at> ics.uci.edu>
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: 5428 <at> debbugs.gnu.org
Subject: Re: bug#5428: vc-annotate for Bzr does not show the date
Date: Fri, 22 Jan 2010 11:26:00 -0800 (PST)
Stefan Monnier <monnier <at> IRO.UMontreal.CA> writes:

  > > Can you please explain how was this different with CVS (and all other
  > > VCs besides svn)?
  > 
  > It wasn't.  So it was a problem that wasn't solved for CVS.
  > Doesn't mean it should be re-introduced for Bzr.

Does it mean that your personal preference should make it impossible to
do useful searches by date?

Why not fix it properly, instead of breaking it?  At least don't make it
strictly worse.

  > > If space is so important why isn't hiding the whole annotation
  > > vc-annotate-toggle-annotation-visibility even more useful?
  > 
  > That's another option, although some info is useful to know which lines
  > were modified at the same time, and which lines where modified
  > before/after other lines (at least in my experience).
  > 
  > >> I'd oppose adding the date until it can be configured away.
  > > So bzr should be less functional that all other VCs until someone cares
  > > to implement a new feature?
  > 
  > I find it more functional, so your characterization is not helpful.

Please explain why is it better not to be able to search by date.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5428; Package emacs,vc. (Fri, 22 Jan 2010 20:22:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dan Nicolaescu <dann <at> ics.uci.edu>
Cc: monnier <at> IRO.UMontreal.CA, 5428 <at> debbugs.gnu.org
Subject: Re: bug#5428: vc-annotate for Bzr does not show the date
Date: Fri, 22 Jan 2010 22:21:44 +0200
> Date: Fri, 22 Jan 2010 11:26:00 -0800 (PST)
> From: Dan Nicolaescu <dann <at> ics.uci.edu>
> Cc: 5428 <at> debbugs.gnu.org
> 
> Please explain why is it better not to be able to search by date.

I don't use VC with Bazaar for now, but FWIW I agree with Dan here:
the dates are important.  I'm always annoyed when I forget to give
"bzr annotate" the switches that cause it to display the dates (gotta
define an alias for that one of these days), and am punished by
annotations that are next to useless.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5428; Package emacs,vc. (Sat, 23 Jan 2010 11:14:01 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Dan Nicolaescu <dann <at> ics.uci.edu>
Cc: 5428 <at> debbugs.gnu.org
Subject: Re: bug#5428: vc-annotate for Bzr does not show the date
Date: Sat, 23 Jan 2010 06:13:47 -0500
>> > Can you please explain how was this different with CVS (and all other
>> > VCs besides svn)?
>> It wasn't.  So it was a problem that wasn't solved for CVS.
>> Doesn't mean it should be re-introduced for Bzr.
> Does it mean that your personal preference should make it impossible to
> do useful searches by date?

No, just that the current preference should not simply be replaced by
another one, unless we provide a way to configure VC to get the current
preference back.

FWIW, it's not impossible to do such searches: Use vc-print-log to see
which dates corresponds to which revision numbers, and then search by
revision number.

> Why not fix it properly, instead of breaking it?  At least don't make it
> strictly worse.

That's exactly what I want: to fix it properly, rather than to replace
one problem with another.

> Please explain why is it better not to be able to search by date.

I already explained it.


        Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5428; Package emacs,vc. (Sat, 23 Jan 2010 17:25:02 GMT) Full text and rfc822 format available.

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

From: Dan Nicolaescu <dann <at> ics.uci.edu>
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: 5428 <at> debbugs.gnu.org
Subject: Re: bug#5428: vc-annotate for Bzr does not show the date
Date: Sat, 23 Jan 2010 09:24:34 -0800 (PST)
Stefan Monnier <monnier <at> IRO.UMontreal.CA> writes:

  > >> > Can you please explain how was this different with CVS (and all other
  > >> > VCs besides svn)?
  > >> It wasn't.  So it was a problem that wasn't solved for CVS.
  > >> Doesn't mean it should be re-introduced for Bzr.
  > > Does it mean that your personal preference should make it impossible to
  > > do useful searches by date?
  > 
  > No, just that the current preference should not simply be replaced by
  > another one, unless we provide a way to configure VC to get the current
  > preference back.

Why not first implement whatever configurability YOU want, and then
change the default display so that it does not make work harder for
other people, instead of just breaking a long time working feature?

  > FWIW, it's not impossible to do such searches: Use vc-print-log to see
  > which dates corresponds to which revision numbers, and then search by
  > revision number.

How is this better than just searching in the vc-annotate buffer that
has been the normal work flow for years?


  > > Why not fix it properly, instead of breaking it?  At least don't make it
  > > strictly worse.
  > 
  > That's exactly what I want: to fix it properly, rather than to replace
  > one problem with another.

Can you please do it in such a way that you don't replace a working (and
in use for a very long time) setup with a broken one?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#5428; Package emacs. (Fri, 08 May 2015 21:36:03 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: 5428 <at> debbugs.gnu.org
Subject: Re: bug#5428: vc-annotate for Bzr does not show the date
Date: Fri, 08 May 2015 17:35:57 -0400
Stefan Monnier wrote:

> In vc-annotate, horizontal space is at a premium, since we're adding
> "margin text" to a file who's content should already be expected to be
> "using up all space" (e.g. all 80 columns).

It's even worse for Git.

Using vc-annotate on a file under Git gives me a buffer where the first
90 columns are taken up with Git output. The actual file itself is
pushed completely off the right.

e95a67dc lisp/emacs-lisp/syntax.el (Stefan Monnier          2012-04-26
08:43:28  -0400   1)  ;;; syntax.el

By contrast in bzr only 21 columns are used.


The "lisp/emacs-lisp/syntax.el " bit seems useless to me.
The bzr version uses a truncated email address rather than a full name.
The Git date field seems way too specific.
The line numbers are totally unnecessary.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#5428; Package emacs. (Sat, 16 May 2015 23:56:02 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Glenn Morris <rgm <at> gnu.org>, Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: 5428 <at> debbugs.gnu.org
Subject: Re: bug#5428: vc-annotate for Bzr does not show the date
Date: Sun, 17 May 2015 02:55:39 +0300
On 05/09/2015 12:35 AM, Glenn Morris wrote:

> Using vc-annotate on a file under Git gives me a buffer where the first
> 90 columns are taken up with Git output. The actual file itself is
> pushed completely off the right.

I've made the date shorter, it'll save us 15 columns.

> The "lisp/emacs-lisp/syntax.el " bit seems useless to me.

That's only displayed if the file has been renamed at some point (some 
revisions are from different paths). But when it is, there's no way to 
turn it off.

Or rather there is: using the -c flag, but then it uses tabs in the 
output, and they make columns not always line up.

Maybe we could remove the file paths in a vc-run-delayed block. Should 
we worry that someone might find them useful?

> The bzr version uses a truncated email address rather than a full name.

We could replace the names with full email addresses, but those are even 
longer, at times.

> The line numbers are totally unnecessary.

Maybe it is, but it's a minor problem compared to the other fields. Also 
there's no way to turn it off.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#5428; Package emacs. (Sun, 17 May 2015 01:17:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: Glenn Morris <rgm <at> gnu.org>, 5428 <at> debbugs.gnu.org
Subject: Re: bug#5428: vc-annotate for Bzr does not show the date
Date: Sat, 16 May 2015 21:16:09 -0400
FWIW, I've often wanted for vc-annotate to use a completely different
approach, where the buffer's text content is just the actual file's
content and the extra annotations are only displayed indirectly
(e.g. via a background color, tooltip text, margin text, or in-buffer
(but togglable by attribute)).

The way I see it working internally is that the process filter adds the
line annotations as a text-property to the file's lines, and then
a jit-lock-triggered function uses this text-property to change the
display as/when needed.

Also by using the unannotated file's text in buffer, we could enable the
normal font-lock rules, so we as to combine the normal font-lock
highlighting with the background-color of vc-annotate.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#5428; Package emacs. (Sun, 17 May 2015 01:31:03 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 5428 <at> debbugs.gnu.org
Subject: Re: bug#5428: vc-annotate for Bzr does not show the date
Date: Sun, 17 May 2015 04:30:45 +0300
On 05/17/2015 04:16 AM, Stefan Monnier wrote:
>
> FWIW, I've often wanted for vc-annotate to use a completely different
> approach, where the buffer's text content is just the actual file's
> content and the extra annotations are only displayed indirectly
> (e.g. via a background color, tooltip text, margin text, or in-buffer
> (but togglable by attribute)).

We already kind of have this possibility, though (via 
vc-annotate-toggle-annotation-visibility). It's not enough because dates 
and names are useful, and even having tooltips won't cut it.

The main stopper, I think, is the "togglable by attribute" UI (well, and 
also the implementations for extracting more granular data for each 
backend).

> Also by using the unannotated file's text in buffer, we could enable the
> normal font-lock rules, so we as to combine the normal font-lock
> highlighting with the background-color of vc-annotate.

That would be nice.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#5428; Package emacs. (Sun, 17 May 2015 01:48:02 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 5428 <at> debbugs.gnu.org
Subject: Re: bug#5428: vc-annotate for Bzr does not show the date
Date: Sun, 17 May 2015 04:47:40 +0300
On 05/17/2015 04:16 AM, Stefan Monnier wrote:

> The way I see it working internally is that the process filter adds the
> line annotations as a text-property to the file's lines,

It should still be a different buffer though, mainly because after doing 
vc-annotate, I usually want to edit the file contents, and the 
annotation information won't stay up to date.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#5428; Package emacs. (Mon, 18 May 2015 16:06:03 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 5428 <at> debbugs.gnu.org
Subject: Re: bug#5428: vc-annotate for Bzr does not show the date
Date: Mon, 18 May 2015 12:05:47 -0400
>> The way I see it working internally is that the process filter adds the
>> line annotations as a text-property to the file's lines,
> It should still be a different buffer though,

Obviously, yes.  Especially because the annotation is in general not
a bout the current version of the file.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#5428; Package emacs. (Sun, 28 Feb 2016 06:15:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: Glenn Morris <rgm <at> gnu.org>, Stefan Monnier <monnier <at> IRO.UMontreal.CA>,
 5428 <at> debbugs.gnu.org
Subject: Re: bug#5428: vc-annotate for Bzr does not show the date
Date: Sun, 28 Feb 2016 17:14:12 +1100
Dmitry Gutov <dgutov <at> yandex.ru> writes:

> On 05/09/2015 12:35 AM, Glenn Morris wrote:
>
>> Using vc-annotate on a file under Git gives me a buffer where the first
>> 90 columns are taken up with Git output. The actual file itself is
>> pushed completely off the right.
>
> I've made the date shorter, it'll save us 15 columns.

It looks to me like the vc-annotate output is reasonable now, so I'm
closing this bug report.  If it's still an issue, please reopen.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug closed, send any further explanations to 5428 <at> debbugs.gnu.org and Dan Nicolaescu <dann <at> ics.uci.edu> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 28 Feb 2016 06:15:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#5428; Package emacs. (Sun, 28 Feb 2016 18:28:01 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 5428 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> IRO.UMontreal.CA>,
 Dmitry Gutov <dgutov <at> yandex.ru>
Subject: Re: bug#5428: vc-annotate for Bzr does not show the date
Date: Sun, 28 Feb 2016 13:27:16 -0500
Lars Ingebrigtsen wrote:

> Dmitry Gutov <dgutov <at> yandex.ru> writes:
>
>> On 05/09/2015 12:35 AM, Glenn Morris wrote:
>>
>>> Using vc-annotate on a file under Git gives me a buffer where the first
>>> 90 columns are taken up with Git output. The actual file itself is
>>> pushed completely off the right.
>>
>> I've made the date shorter, it'll save us 15 columns.
>
> It looks to me like the vc-annotate output is reasonable now, so I'm
> closing this bug report.  If it's still an issue, please reopen.

The actual report was that vc-annotate for bzr does not show the date.
It still doesn't, so I don't see why you would think this is fixed.
The meta-issue was that the various backends display different
annotation information.

TLDR: reopening.




Did not alter fixed versions and reopened. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 28 Feb 2016 18:28:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#5428; Package emacs. (Thu, 27 Jun 2019 17:37:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: Dan Nicolaescu <dann <at> ics.uci.edu>, Dmitry Gutov <dgutov <at> yandex.ru>,
 Stefan Monnier <monnier <at> IRO.UMontreal.CA>, 5428 <at> debbugs.gnu.org
Subject: Re: bug#5428: vc-annotate for Bzr does not show the date
Date: Thu, 27 Jun 2019 19:36:17 +0200
Glenn Morris <rgm <at> gnu.org> writes:

>> It looks to me like the vc-annotate output is reasonable now, so I'm
>> closing this bug report.  If it's still an issue, please reopen.
>
> The actual report was that vc-annotate for bzr does not show the date.
> It still doesn't, so I don't see why you would think this is fixed.
> The meta-issue was that the various backends display different
> annotation information.

Indeed.  The bzr output is really, really terse.

I've reworked Dan's patch to work apply now, and with that I get lines
like

1   larsi <at> gnus.org 20190627 | Foo

which seem nice and terse, but informative.  (The current git version,
on the other hand, is way overboard in noise.)

Does anybody still object to this change?  Stefan wanted this to be
customisable, and that would be nice, and should probably apply to all
backends, but it's a somewhat orthogonal issue...

diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el
index ee1646cae5..89f1fcce37 100644
--- a/lisp/vc/vc-bzr.el
+++ b/lisp/vc/vc-bzr.el
@@ -869,61 +869,25 @@ vc-bzr-annotate-command
 property containing author and date information."
   (apply #'vc-bzr-command "annotate" buffer 'async file "--long" "--all"
          (append (vc-switches 'bzr 'annotate)
-		 (if revision (list "-r" revision))))
-  (let ((table (make-hash-table :test 'equal)))
-    (set-process-filter
-     (get-buffer-process buffer)
-     (lambda (proc string)
-       (when (process-buffer proc)
-         (with-current-buffer (process-buffer proc)
-           (setq string (concat (process-get proc :vc-left-over) string))
-           ;; Eg: 102020      Gnus developers          20101020 | regexp."
-           ;; As of bzr 2.2.2, no email address in whoami (which can
-           ;; lead to spaces in the author field) is allowed but discouraged.
-           ;; See bug#7792.
-           (while (string-match "^\\( *[0-9.]+ *\\) \\(.+?\\) +\\([0-9]\\{8\\}\\)\\( |.*\n\\)" string)
-             (let* ((rev (match-string 1 string))
-                    (author (match-string 2 string))
-                    (date (match-string 3 string))
-                    (key (substring string (match-beginning 0)
-                                    (match-beginning 4)))
-                    (line (match-string 4 string))
-                    (tag (gethash key table))
-                    (inhibit-read-only t))
-               (setq string (substring string (match-end 0)))
-	       (unless tag
-		 (setq tag
-		       (propertize
-			(format "%s %-7.7s" rev author)
-			'help-echo (format "Revision: %d, author: %s, date: %s"
-					   (string-to-number rev)
-					   author date)
-			'mouse-face 'highlight))
-                 (puthash key tag table))
-               (goto-char (process-mark proc))
-               (insert tag line)
-               (move-marker (process-mark proc) (point))))
-           (process-put proc :vc-left-over string)))))))
+		 (if revision (list "-r" revision)))))
 
 (declare-function vc-annotate-convert-time "vc-annotate" (&optional time))
 
 (defun vc-bzr-annotate-time ()
-  (when (re-search-forward "^ *[0-9.]+ +.+? +|" nil t)
-    (let ((prop (get-text-property (line-beginning-position) 'help-echo)))
-      (string-match "[0-9]+\\'" prop)
-      (let ((str (match-string-no-properties 0 prop)))
+  (when (re-search-forward "^[0-9.]+ +[^\n ]* +\\([0-9]\\{8\\}\\) |" nil t)
+    (let ((str (match-string-no-properties 1)))
       (vc-annotate-convert-time
        (encode-time 0 0 0
-                      (string-to-number (substring str 6 8))
-                      (string-to-number (substring str 4 6))
-                      (string-to-number (substring str 0 4))))))))
+                    (string-to-number (substring str 6 8))
+                    (string-to-number (substring str 4 6))
+                    (string-to-number (substring str 0 4)))))))
 
 (defun vc-bzr-annotate-extract-revision-at-line ()
   "Return revision for current line of annotation buffer, or nil.
 Return nil if current line isn't annotated."
   (save-excursion
     (beginning-of-line)
-    (if (looking-at "^ *\\([0-9.]+\\) +.* +|")
+    (if (looking-at "^\\([0-9.]+\\) +[^\n ]* +\\([0-9]\\{8\\}\\) |")
         (match-string-no-properties 1))))
 
 (defun vc-bzr-command-discarding-stderr (command &rest args)


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#5428; Package emacs. (Thu, 27 Jun 2019 18:06:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Dan Nicolaescu <dann <at> ics.uci.edu>, Glenn Morris <rgm <at> gnu.org>,
 Dmitry Gutov <dgutov <at> yandex.ru>, 5428 <at> debbugs.gnu.org
Subject: Re: bug#5428: vc-annotate for Bzr does not show the date
Date: Thu, 27 Jun 2019 14:05:31 -0400
> Does anybody still object to this change?  Stefan wanted this to be
> customisable, and that would be nice, and should probably apply to all
> backends, but it's a somewhat orthogonal issue...

Last time I used vc-annotate was in 2014, so the need for
customization is not very high up in my list.


        Stefan





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#5428; Package emacs. (Thu, 27 Jun 2019 18:12:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Glenn Morris <rgm <at> gnu.org>, 5428 <at> debbugs.gnu.org,
 Dan Nicolaescu <dann <at> ics.uci.edu>, Dmitry Gutov <dgutov <at> yandex.ru>
Subject: Re: bug#5428: vc-annotate for Bzr does not show the date
Date: Thu, 27 Jun 2019 20:11:11 +0200
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>> Does anybody still object to this change?  Stefan wanted this to be
>> customisable, and that would be nice, and should probably apply to all
>> backends, but it's a somewhat orthogonal issue...
>
> Last time I used vc-annotate was in 2014, so the need for
> customization is not very high up in my list.

OK; I'll go ahead and apply the patch, because I think the resulting bzr
output was nicer...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#5428; Package emacs. (Thu, 27 Jun 2019 18:14:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Dan Nicolaescu <dann <at> ics.uci.edu>
Cc: Stefan Monnier <monnier <at> IRO.UMontreal.CA>, 5428 <at> debbugs.gnu.org
Subject: Re: bug#5428: vc-annotate for Bzr does not show the date
Date: Thu, 27 Jun 2019 20:13:46 +0200
Dan Nicolaescu <dann <at> ics.uci.edu> writes:

> Meanwhile here's a patch for people that want to be able to fully use of
> vc-annotate with bzr.  Just removes a bunch of code and adjusts 2 regexps.

I've now applied this to the Emacs trunk.  Just took nine years.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 27 Jun 2019 18:14:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 27.1, send any further explanations to 5428 <at> debbugs.gnu.org and Dan Nicolaescu <dann <at> ics.uci.edu> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 27 Jun 2019 18:14:03 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. (Fri, 26 Jul 2019 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 273 days ago.

Previous Next


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