unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Dan Nicolaescu <dann@ics.uci.edu>
Cc: emacs-devel@gnu.org
Subject: Re: vc-annotate with bzr
Date: Fri, 14 Mar 2008 15:40:08 -0400	[thread overview]
Message-ID: <jwvprtxjdt3.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <200803132353.m2DNrNuD000824@sallyv1.ics.uci.edu> (Dan Nicolaescu's message of "Thu, 13 Mar 2008 16:53:23 -0700")

> 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




  reply	other threads:[~2008-03-14 19:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-13 23:53 vc-annotate with bzr Dan Nicolaescu
2008-03-14 19:40 ` Stefan Monnier [this message]
2008-03-14 20:07   ` Dan Nicolaescu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvprtxjdt3.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=dann@ics.uci.edu \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).