aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2011-01-05 21:14:54 -0800
committerGlenn Morris2011-01-05 21:14:54 -0800
commitb0a8e46b53d2794508a679c59b9520e38a76eebd (patch)
tree0bda09aacd655438336735d03eccc70bac545a04
parentf77ca003443c9d2bc87eb403e4c9a9a651d67ada (diff)
downloademacs-b0a8e46b53d2794508a679c59b9520e38a76eebd.tar.gz
emacs-b0a8e46b53d2794508a679c59b9520e38a76eebd.zip
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.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/vc/vc-bzr.el13
2 files changed, 14 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index be65508a115..47b5f9069ac 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12011-01-06 Glenn Morris <rgm@gnu.org>
2
3 * vc/vc-bzr.el (vc-bzr-annotate-command, vc-bzr-annotate-time)
4 (vc-bzr-annotate-extract-revision-at-line):
5 Handle authors with embedded spaces. (Bug#7792)
6
12011-01-05 Tassilo Horn <tassilo@member.fsf.org> 72011-01-05 Tassilo Horn <tassilo@member.fsf.org>
2 8
3 * doc-view.el (doc-view-image-width): New variable. 9 * doc-view.el (doc-view-image-width): New variable.
diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el
index 9b0d402c078..d5d3c9d4888 100644
--- a/lisp/vc/vc-bzr.el
+++ b/lisp/vc/vc-bzr.el
@@ -1,7 +1,6 @@
1;;; vc-bzr.el --- VC backend for the bzr revision control system 1;;; vc-bzr.el --- VC backend for the bzr revision control system
2 2
3;; Copyright (C) 2006, 2007, 2008, 2009, 2010 3;; Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
4;; Free Software Foundation, Inc.
5 4
6;; Author: Dave Love <fx@gnu.org> 5;; Author: Dave Love <fx@gnu.org>
7;; Riccardo Murri <riccardo.murri@gmail.com> 6;; Riccardo Murri <riccardo.murri@gmail.com>
@@ -720,7 +719,11 @@ property containing author and date information."
720 (when (process-buffer proc) 719 (when (process-buffer proc)
721 (with-current-buffer (process-buffer proc) 720 (with-current-buffer (process-buffer proc)
722 (setq string (concat (process-get proc :vc-left-over) string)) 721 (setq string (concat (process-get proc :vc-left-over) string))
723 (while (string-match "^\\( *[0-9.]+ *\\) \\([^\n ]+\\) +\\([0-9]\\{8\\}\\)\\( |.*\n\\)" string) 722 ;; Eg: 102020 Gnus developers 20101020 | regexp."
723 ;; As of bzr 2.2.2, no email address in whoami (which can
724 ;; lead to spaces in the author field) is allowed but discouraged.
725 ;; See bug#7792.
726 (while (string-match "^\\( *[0-9.]+ *\\) \\(.+?\\) +\\([0-9]\\{8\\}\\)\\( |.*\n\\)" string)
724 (let* ((rev (match-string 1 string)) 727 (let* ((rev (match-string 1 string))
725 (author (match-string 2 string)) 728 (author (match-string 2 string))
726 (date (match-string 3 string)) 729 (date (match-string 3 string))
@@ -747,7 +750,7 @@ property containing author and date information."
747(declare-function vc-annotate-convert-time "vc-annotate" (time)) 750(declare-function vc-annotate-convert-time "vc-annotate" (time))
748 751
749(defun vc-bzr-annotate-time () 752(defun vc-bzr-annotate-time ()
750 (when (re-search-forward "^ *[0-9.]+ +[^\n ]* +|" nil t) 753 (when (re-search-forward "^ *[0-9.]+ +.* +|" nil t)
751 (let ((prop (get-text-property (line-beginning-position) 'help-echo))) 754 (let ((prop (get-text-property (line-beginning-position) 'help-echo)))
752 (string-match "[0-9]+\\'" prop) 755 (string-match "[0-9]+\\'" prop)
753 (let ((str (match-string-no-properties 0 prop))) 756 (let ((str (match-string-no-properties 0 prop)))
@@ -762,7 +765,7 @@ property containing author and date information."
762Return nil if current line isn't annotated." 765Return nil if current line isn't annotated."
763 (save-excursion 766 (save-excursion
764 (beginning-of-line) 767 (beginning-of-line)
765 (if (looking-at "^ *\\([0-9.]+\\) +[^\n ]* +|") 768 (if (looking-at "^ *\\([0-9.]+\\) +.* +|")
766 (match-string-no-properties 1)))) 769 (match-string-no-properties 1))))
767 770
768(defun vc-bzr-command-discarding-stderr (command &rest args) 771(defun vc-bzr-command-discarding-stderr (command &rest args)