Subject: Re: bug#7792: 24.0.50; vc-annotate doesn't understand all commiters IDs

From: Stefan Monnier <[email-masked]>
Date: Thu, 06 Jan 2011 20:22:29 -0500

close 7792
thanks

> While trying to find a large file to try vc-annotate on for the BZR
> backend, I first tried lisp/gnus/gnus-art.el from the Emacs repository
> but I noticed that commits (such as r102020
> <http://bazaar.launchpad.net/~vcs-imports/emacs/trunk/revision/102020>)
> that were made by a committer with a space in zes[1] commit id were not
> found.

Indeed.  I've committed the patch below to the emacs-23 branch (for
Emacs-23.3) which should fix it.

Note that the author name used in those commits (i.e. "Gnus
developpers") is not a good choice since it doesn't follow the "name
<email>" format.  So it should have been something like "Gnus
developpers <[email-masked]>" which would not have triggered this bug.

        Stefan

=== modified file 'lisp/ChangeLog'
--- lisp/ChangeLog	2011-01-04 07:09:46 +0000
+++ lisp/ChangeLog	2011-01-06 16:00:20 +0000
@@ -1,3 +1,8 @@
+2011-01-06  Stefan Monnier  <[email-masked]>
+
+	* vc-bzr.el (vc-bzr-annotate-command, vc-bzr-annotate-time):
+	Author names can have space (bug#7792).
+
 2011-01-04  Kenichi Handa  <[email-masked]>
 
 	* mail/rmailmm.el (rmail-mime-insert-bulk): Display an unknown

=== modified file 'lisp/vc-bzr.el'
--- lisp/vc-bzr.el	2011-01-02 23:50:46 +0000
+++ lisp/vc-bzr.el	2011-01-06 15:33:56 +0000
@@ -605,7 +605,7 @@
        (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)
+           (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))
@@ -632,7 +632,7 @@
 (declare-function vc-annotate-convert-time "vc-annotate" (time))
 
 (defun vc-bzr-annotate-time ()
-  (when (re-search-forward "^ *[0-9.]+ +[^\n ]* +|" nil t)
+  (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)))