emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r102766: vc-bzr fix for bug #7792.


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r102766: vc-bzr fix for bug #7792.
Date: Wed, 05 Jan 2011 21:14:54 -0800
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 102766
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Wed 2011-01-05 21:14:54 -0800
message:
  vc-bzr fix for bug #7792.
  
  * lisp/vc/vc-bzr.el (vc-bzr-annotate-command, vc-bzr-annotate-time)
  (vc-bzr-annotate-extract-revision-at-line):
  Handle authors with embedded spaces.
modified:
  lisp/ChangeLog
  lisp/vc/vc-bzr.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-01-05 21:17:51 +0000
+++ b/lisp/ChangeLog    2011-01-06 05:14:54 +0000
@@ -1,3 +1,9 @@
+2011-01-06  Glenn Morris  <address@hidden>
+
+       * vc/vc-bzr.el (vc-bzr-annotate-command, vc-bzr-annotate-time)
+       (vc-bzr-annotate-extract-revision-at-line):
+       Handle authors with embedded spaces.  (Bug#7792)
+
 2011-01-05  Tassilo Horn  <address@hidden>
 
        * doc-view.el (doc-view-image-width): New variable.

=== modified file 'lisp/vc/vc-bzr.el'
--- a/lisp/vc/vc-bzr.el 2010-12-11 02:54:07 +0000
+++ b/lisp/vc/vc-bzr.el 2011-01-06 05:14:54 +0000
@@ -1,7 +1,6 @@
 ;;; vc-bzr.el --- VC backend for the bzr revision control system
 
-;; Copyright (C) 2006, 2007, 2008, 2009, 2010
-;;   Free Software Foundation, Inc.
+;; Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011  Free Software Foundation, 
Inc.
 
 ;; Author: Dave Love <address@hidden>
 ;;        Riccardo Murri <address@hidden>
@@ -720,7 +719,11 @@
        (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)
+           ;; 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))
@@ -747,7 +750,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)))
@@ -762,7 +765,7 @@
 Return nil if current line isn't annotated."
   (save-excursion
     (beginning-of-line)
-    (if (looking-at "^ *\\([0-9.]+\\) +[^\n ]* +|")
+    (if (looking-at "^ *\\([0-9.]+\\) +.* +|")
         (match-string-no-properties 1))))
 
 (defun vc-bzr-command-discarding-stderr (command &rest args)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]