aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2009-12-06 20:22:16 +0000
committerChong Yidong2009-12-06 20:22:16 +0000
commit2c6bb71a57b1f7a36442ecb80933cd773a80ea02 (patch)
treef393fd13ea52fa4346bb36d481ce15a4454b1602
parent8e39154d85464b64d3afbf1c83d553e101e6cb32 (diff)
downloademacs-2c6bb71a57b1f7a36442ecb80933cd773a80ea02.tar.gz
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.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/vc-bzr.el16
2 files changed, 15 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index a8c4a0ceec9..b25d09dab05 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -10,6 +10,11 @@
10 10
112009-12-06 Chong Yidong <cyd@stupidchicken.com> 112009-12-06 Chong Yidong <cyd@stupidchicken.com>
12 12
13 * vc-bzr.el (vc-bzr-annotate-command): Show author in annotation.
14 Handle empty author field (Bug#4144). Suggested by Óscar Fuentes.
15 (vc-bzr-annotate-time, vc-bzr-annotate-extract-revision-at-line):
16 Update annotation regexp.
17
13 * simple.el (beginning-of-visual-line): Constrain to field 18 * simple.el (beginning-of-visual-line): Constrain to field
14 boundaries (Bug#5106). 19 boundaries (Bug#5106).
15 20
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."
571 (tag (gethash key table)) 571 (tag (gethash key table))
572 (inhibit-read-only t)) 572 (inhibit-read-only t))
573 (setq string (substring string (match-end 0))) 573 (setq string (substring string (match-end 0)))
574 (unless tag 574 (unless tag
575 (setq tag (propertize rev 'help-echo (concat "Author: " author 575 (setq tag
576 ", date: " date) 576 (propertize
577 'mouse-face 'highlight)) 577 (concat rev " " (substring author 0 7))
578 'help-echo (format "Revision: %d, author: %s, date: %s"
579 (string-to-number rev)
580 author date)
581 'mouse-face 'highlight))
578 (puthash key tag table)) 582 (puthash key tag table))
579 (goto-char (process-mark proc)) 583 (goto-char (process-mark proc))
580 (insert tag line) 584 (insert tag line)
@@ -584,7 +588,7 @@ property containing author and date information."
584(declare-function vc-annotate-convert-time "vc-annotate" (time)) 588(declare-function vc-annotate-convert-time "vc-annotate" (time))
585 589
586(defun vc-bzr-annotate-time () 590(defun vc-bzr-annotate-time ()
587 (when (re-search-forward "^ *[0-9.]+ +|" nil t) 591 (when (re-search-forward "^ *[0-9.]+ +[^\n ]* +|" nil t)
588 (let ((prop (get-text-property (line-beginning-position) 'help-echo))) 592 (let ((prop (get-text-property (line-beginning-position) 'help-echo)))
589 (string-match "[0-9]+\\'" prop) 593 (string-match "[0-9]+\\'" prop)
590 (let ((str (match-string-no-properties 0 prop))) 594 (let ((str (match-string-no-properties 0 prop)))
@@ -599,7 +603,7 @@ property containing author and date information."
599Return nil if current line isn't annotated." 603Return nil if current line isn't annotated."
600 (save-excursion 604 (save-excursion
601 (beginning-of-line) 605 (beginning-of-line)
602 (if (looking-at " *\\([0-9.]+\\) *| ") 606 (if (looking-at "^ *\\([0-9.]+\\) +[^\n ]* +|")
603 (match-string-no-properties 1)))) 607 (match-string-no-properties 1))))
604 608
605(defun vc-bzr-command-discarding-stderr (command &rest args) 609(defun vc-bzr-command-discarding-stderr (command &rest args)