summaryrefslogtreecommitdiff
path: root/lisp/vc-bzr.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2009-12-06 20:22:16 +0000
committerChong Yidong <cyd@stupidchicken.com>2009-12-06 20:22:16 +0000
commit2c6bb71a57b1f7a36442ecb80933cd773a80ea02 (patch)
treef393fd13ea52fa4346bb36d481ce15a4454b1602 /lisp/vc-bzr.el
parent8e39154d85464b64d3afbf1c83d553e101e6cb32 (diff)
downloademacs-2c6bb71a57b1f7a36442ecb80933cd773a80ea02.tar.gz
emacs-2c6bb71a57b1f7a36442ecb80933cd773a80ea02.tar.bz2
emacs-2c6bb71a57b1f7a36442ecb80933cd773a80ea02.zip
* vc-bzr.el (vc-bzr-annotate-command): Show author in annotation.
Handle empty author field (Bug#4144). Suggested by Óscar Fuentes. (vc-bzr-annotate-time, vc-bzr-annotate-extract-revision-at-line): Update annotation regexp.
Diffstat (limited to 'lisp/vc-bzr.el')
-rw-r--r--lisp/vc-bzr.el16
1 files changed, 10 insertions, 6 deletions
diff --git a/lisp/vc-bzr.el b/lisp/vc-bzr.el
index eb021f5e3db..233cdb171ee 100644
--- a/lisp/vc-bzr.el
+++ b/lisp/vc-bzr.el
@@ -571,10 +571,14 @@ property containing author and date information."
(tag (gethash key table))
(inhibit-read-only t))
(setq string (substring string (match-end 0)))
- (unless tag
- (setq tag (propertize rev 'help-echo (concat "Author: " author
- ", date: " date)
- 'mouse-face 'highlight))
+ (unless tag
+ (setq tag
+ (propertize
+ (concat rev " " (substring author 0 7))
+ '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)
@@ -584,7 +588,7 @@ property containing author and date information."
(declare-function vc-annotate-convert-time "vc-annotate" (time))
(defun vc-bzr-annotate-time ()
- (when (re-search-forward "^ *[0-9.]+ +|" nil t)
+ (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)))
@@ -599,7 +603,7 @@ property containing author and date information."
Return nil if current line isn't annotated."
(save-excursion
(beginning-of-line)
- (if (looking-at " *\\([0-9.]+\\) *| ")
+ (if (looking-at "^ *\\([0-9.]+\\) +[^\n ]* +|")
(match-string-no-properties 1))))
(defun vc-bzr-command-discarding-stderr (command &rest args)