From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.bugs Subject: bug#5428: vc-annotate for Bzr does not show the date Date: Thu, 21 Jan 2010 07:27:50 -0800 (PST) Message-ID: <201001211527.o0LFRokp021595@godzilla.ics.uci.edu> References: <201001200726.o0K7Qn9W013724@godzilla.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 1264088511 1758 80.91.229.12 (21 Jan 2010 15:41:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 21 Jan 2010 15:41:51 +0000 (UTC) Cc: 5428@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jan 21 16:41:42 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NXzAD-00005y-JS for geb-bug-gnu-emacs@m.gmane.org; Thu, 21 Jan 2010 16:41:42 +0100 Original-Received: from localhost ([127.0.0.1]:41582 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NXzAE-0003uZ-GR for geb-bug-gnu-emacs@m.gmane.org; Thu, 21 Jan 2010 10:41:42 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NXz8H-0001K4-8o for bug-gnu-emacs@gnu.org; Thu, 21 Jan 2010 10:39:41 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NXz8C-0001E0-5q for bug-gnu-emacs@gnu.org; Thu, 21 Jan 2010 10:39:40 -0500 Original-Received: from [199.232.76.173] (port=51500 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NXz8B-0001Dk-P1 for bug-gnu-emacs@gnu.org; Thu, 21 Jan 2010 10:39:35 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40531) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NXz8B-0003Se-6L for bug-gnu-emacs@gnu.org; Thu, 21 Jan 2010 10:39:35 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1NXyxx-0002yX-Nk; Thu, 21 Jan 2010 10:29:01 -0500 X-Loop: bug-gnu-emacs@gnu.org Resent-From: Dan Nicolaescu Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 21 Jan 2010 15:29:01 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 5428 X-Emacs-PR-Package: emacs,vc X-Emacs-PR-Keywords: Original-Received: via spool by 5428-submit@debbugs.gnu.org id=B5428.126408768411421 (code B ref 5428); Thu, 21 Jan 2010 15:29:01 +0000 Original-Received: (at 5428) by debbugs.gnu.org; 21 Jan 2010 15:28:04 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NXyx2-0002y9-7N for submit@debbugs.gnu.org; Thu, 21 Jan 2010 10:28:04 -0500 Original-Received: from colin-baker-v0.ics.uci.edu ([128.195.1.153]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NXyx0-0002xk-3b; Thu, 21 Jan 2010 10:28:03 -0500 Original-Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101]) by colin-baker-v0.ics.uci.edu (8.13.8/8.13.8) with ESMTP id o0LFRpKn000661 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 21 Jan 2010 07:27:51 -0800 Original-Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id o0LFRokp021595; Thu, 21 Jan 2010 07:27:50 -0800 (PST) In-Reply-To: (Stefan Monnier's message of "Thu, 21 Jan 2010 09:17:16 -0500") Original-Lines: 97 X-ICS-MailScanner-Information: Please send mail to helpdesk@ics.uci.edu or more information X-ICS-MailScanner-ID: o0LFRpKn000661 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-0.263, required 5, autolearn=disabled, ALL_TRUSTED -1.44, FM_MULTI_ODD2 1.10, TW_BZ 0.08) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list X-Spam-Score: -2.6 (--) Resent-Date: Thu, 21 Jan 2010 10:29:01 -0500 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:34600 Archived-At: tags 5428 patch quit Stefan Monnier writes: > > The date is in a very compact format YYYYMMDD, so it does not take much > > screen space. > > In vc-annotate, horizontal space is at a premium, since we're adding > "margin text" to a file who's content should already be expected to be > "using up all space" (e.g. all 80 columns). Can you please explain how was this different with CVS (and all other VCs besides svn)? If space is so important why isn't hiding the whole annotation vc-annotate-toggle-annotation-visibility even more useful? > I'd oppose adding the date until it can be configured away. So bzr should be less functional that all other VCs until someone cares to implement a new feature? Meanwhile here's a patch for people that want to be able to fully use of vc-annotate with bzr. Just removes a bunch of code and adjusts 2 regexps. Index: vc-bzr.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/vc-bzr.el,v retrieving revision 1.94 diff -u -3 -p -u -p -r1.94 vc-bzr.el --- vc-bzr.el 9 Dec 2009 06:04:12 -0000 1.94 +++ vc-bzr.el 21 Jan 2010 15:18:51 -0000 @@ -558,57 +585,25 @@ REV non-nil gets an error." Each line is tagged with the revision number, which has a `help-echo' property containing author and date information." (apply #'vc-bzr-command "annotate" buffer 'async file "--long" "--all" - (if revision (list "-r" revision))) - (lexical-let ((table (make-hash-table :test 'equal))) - (set-process-filter - (get-buffer-process buffer) - (lambda (proc string) - (when (process-buffer proc) - (with-current-buffer (process-buffer proc) - (setq string (concat (process-get proc :vc-left-over) string)) - (while (string-match "^\\( *[0-9.]+ *\\) \\([^\n ]+\\) +\\([0-9]\\{8\\}\\)\\( |.*\n\\)" string) - (let* ((rev (match-string 1 string)) - (author (match-string 2 string)) - (date (match-string 3 string)) - (key (substring string (match-beginning 0) - (match-beginning 4))) - (line (match-string 4 string)) - (tag (gethash key table)) - (inhibit-read-only t)) - (setq string (substring string (match-end 0))) - (unless tag - (setq tag - (propertize - (format "%s %-7.7s" rev author) - 'help-echo (format "Revision: %d, author: %s, date: %s" - (string-to-number rev) - author date) - 'mouse-face 'highlight)) - (puthash key tag table)) - (goto-char (process-mark proc)) - (insert tag line) - (move-marker (process-mark proc) (point)))) - (process-put proc :vc-left-over string))))))) + (if revision (list "-r" revision)))) (declare-function vc-annotate-convert-time "vc-annotate" (time)) (defun vc-bzr-annotate-time () - (when (re-search-forward "^ *[0-9.]+ +[^\n ]* +|" nil t) - (let ((prop (get-text-property (line-beginning-position) 'help-echo))) - (string-match "[0-9]+\\'" prop) - (let ((str (match-string-no-properties 0 prop))) + (when (re-search-forward "^[0-9.]+ +[^\n ]* +\\([0-9]\\{8\\}\\) |" nil t) + (let ((str (match-string-no-properties 1))) (vc-annotate-convert-time (encode-time 0 0 0 (string-to-number (substring str 6 8)) (string-to-number (substring str 4 6)) - (string-to-number (substring str 0 4)))))))) + (string-to-number (substring str 0 4))))))) (defun vc-bzr-annotate-extract-revision-at-line () "Return revision for current line of annoation buffer, or nil. Return nil if current line isn't annotated." (save-excursion (beginning-of-line) - (if (looking-at "^ *\\([0-9.]+\\) +[^\n ]* +|") + (if (looking-at "^\\([0-9.]+\\) +[^\n ]* +\\([0-9]\\{8\\}\\) |") (match-string-no-properties 1)))) (defun vc-bzr-command-discarding-stderr (command &rest args)