[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: vc-annotate with bzr
From: |
Stefan Monnier |
Subject: |
Re: vc-annotate with bzr |
Date: |
Fri, 14 Mar 2008 15:40:08 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
> The vc-annotate display with bzr (i.e. the output of
> vc-bzr-annotate-command) is not consistent with the output of other
> VC backends: the annotations don't start from the same column, so it is
> hard to follow.
I'm not sure what you mean, but if you refer to the fact that the
annotation takes a varying amount of space which breaks alignment, I've
just installed a fix for it in the 22 branch.
Stefan
--- vc-bzr.el.~1.11.2.11.~ 2008-01-06 20:18:57.000000000 -0500
+++ vc-bzr.el 2008-03-14 15:36:52.000000000 -0400
@@ -146,13 +146,19 @@
(vc-bzr-state file) ; Some other unknown format?
(let* ((relfile (file-relative-name file root))
(reldir (file-name-directory relfile)))
- (re-search-forward
+ (when (re-search-forward
(concat "^\0"
- (if reldir (regexp-quote (directory-file-name
reldir)))
+ (if reldir (regexp-quote
+ (directory-file-name reldir)))
"\0"
(regexp-quote (file-name-nondirectory relfile))
"\0")
- nil t)))))))))
+ nil t)
+ ;; Make sure `bzr' agrees that this file is under Bzr's
+ ;; control. This is important because if `bzr' is not
+ ;; installed vc-find-file may otherwise get an error in
+ ;; the subsequent call to `vc-state'.
+ (vc-bzr-state file))))))))))
(defconst vc-bzr-state-words
"added\\|ignored\\|kind changed\\|modified\\|removed\\|renamed\\|unknown"
@@ -430,7 +436,7 @@
;; to allow saving space by sharing the text properties.
(setq vc-bzr-annotation-table (make-hash-table :test 'equal))
(goto-char (point-min))
- (while (re-search-forward "^\\( *[0-9]+\\) +\\(.+\\) +\\([0-9]\\{8\\}\\) |"
+ (while (re-search-forward "^\\( *[0-9]+ *\\) \\([^\n ]+\\)
+\\([0-9]\\{8\\}\\) |"
nil t)
(let* ((rev (match-string 1))
(author (match-string 2))
@@ -446,7 +452,7 @@
(insert tag " |")))))
(defun vc-bzr-annotate-time ()
- (when (re-search-forward "^ *[0-9]+ |" 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)
(vc-annotate-convert-time