From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: vc-annotate with bzr Date: Fri, 14 Mar 2008 15:40:08 -0400 Message-ID: References: <200803132353.m2DNrNuD000824@sallyv1.ics.uci.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1205523634 22828 80.91.229.12 (14 Mar 2008 19:40:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 14 Mar 2008 19:40:34 +0000 (UTC) Cc: emacs-devel@gnu.org To: Dan Nicolaescu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 14 20:41:02 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JaFlz-00065p-3p for ged-emacs-devel@m.gmane.org; Fri, 14 Mar 2008 20:40:59 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JaFlP-0005OW-Ux for ged-emacs-devel@m.gmane.org; Fri, 14 Mar 2008 15:40:24 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JaFlG-0005MD-1M for emacs-devel@gnu.org; Fri, 14 Mar 2008 15:40:14 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JaFlC-0005Ku-Js for emacs-devel@gnu.org; Fri, 14 Mar 2008 15:40:13 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JaFlC-0005Kc-8a for emacs-devel@gnu.org; Fri, 14 Mar 2008 15:40:10 -0400 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JaFlC-00065Z-0r for emacs-devel@gnu.org; Fri, 14 Mar 2008 15:40:10 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEAPZw2kdMCrZs/2dsb2JhbACqL4EI X-IronPort-AV: E=Sophos;i="4.25,502,1199682000"; d="scan'208";a="16069710" Original-Received: from smtp.pppoe.ca ([65.39.196.238]) by ironport2-out.pppoe.ca with ESMTP; 14 Mar 2008 15:40:08 -0400 Original-Received: from pastel.home ([76.10.182.108]) by smtp.pppoe.ca (Internet Mail Server v1.0) with ESMTP id UWC73908; Fri, 14 Mar 2008 15:40:08 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 848178F43; Fri, 14 Mar 2008 15:40:08 -0400 (EDT) In-Reply-To: <200803132353.m2DNrNuD000824@sallyv1.ics.uci.edu> (Dan Nicolaescu's message of "Thu, 13 Mar 2008 16:53:23 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:92608 Archived-At: > 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