Subject: bug#4144: 23.1.50; VC Annotate for bzr files broken

From: Óscar Fuentes <[email-masked]>
Date: Mon, 07 Sep 2009 07:17:34 +0200

The breakage is caused by commits with empty `committer' field (in this
case coming from conversions from other VCS). This confuses the regexp
used by vc-bzr-annotate-command for determining revision id, author and
date.

Some experimentation shows that this regexp works on the case of empty
committer field too:

*** /usr/local/share/emacs/23.1.50/lisp/vc-bzr.el.gz
--- /tmp/buffer-content-191724Q
***************
*** 547,553 ****
      ;; 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.]+ *\\) \\([^\n ]+\\) +\\([0-9]\\{8\\}\\) |"
                                nil t)
        (let* ((rev (match-string 1))
               (author (match-string 2))
--- 547,554 ----
      ;; to allow saving space by sharing the text properties.
      (setq vc-bzr-annotation-table (make-hash-table :test 'equal))
      (goto-char (point-min))
!     ;;; `author' field may be empty:
!     (while (re-search-forward "^\\( *[0-9.]+\\) *\\([^\n ]* *?\\) +\\([0-9]\\{8\\}\\) |"
                                nil t)
        (let* ((rev (match-string 1))
               (author (match-string 2))