From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: improve vc-bzr-print-log Date: Sun, 26 Jul 2009 10:28:23 -0700 (PDT) Message-ID: <200907261728.n6QHSNCP010388@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 1248629435 8258 80.91.229.12 (26 Jul 2009 17:30:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 26 Jul 2009 17:30:35 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 26 19:30:28 2009 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 1MV7YJ-0002ZJ-Ip for ged-emacs-devel@m.gmane.org; Sun, 26 Jul 2009 19:30:27 +0200 Original-Received: from localhost ([127.0.0.1]:34555 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MV7YI-0004CF-LS for ged-emacs-devel@m.gmane.org; Sun, 26 Jul 2009 13:30:26 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MV7YA-0004A3-Pr for emacs-devel@gnu.org; Sun, 26 Jul 2009 13:30:18 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MV7Y5-00045K-Mr for emacs-devel@gnu.org; Sun, 26 Jul 2009 13:30:18 -0400 Original-Received: from [199.232.76.173] (port=44039 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MV7Y5-00045H-Dl for emacs-devel@gnu.org; Sun, 26 Jul 2009 13:30:13 -0400 Original-Received: from barrelv2.ics.uci.edu ([128.195.1.114]:37650) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1MV7Y5-00086v-0V for emacs-devel@gnu.org; Sun, 26 Jul 2009 13:30:13 -0400 Original-Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101]) by barrelv2.ics.uci.edu (8.13.8+Sun/8.13.8) with ESMTP id n6QHSNVR015432 for ; Sun, 26 Jul 2009 10:28:23 -0700 (PDT) Original-Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id n6QHSNCP010388; Sun, 26 Jul 2009 10:28:23 -0700 (PDT) Original-Lines: 40 X-ICS-MailScanner-Information: Please contact the ISP for more information X-ICS-MailScanner-ID: n6QHSNVR015432 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.363, required 5, autolearn=disabled, ALL_TRUSTED -1.44, TW_BZ 0.08) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta) 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:113174 Archived-At: When vc-bzr was written "bzr log" did not take multiple file arguments, it does now, so vc-bzr-print-log can take advantage of this. Any objection to this patch? --- vc-bzr.el.~1.78.~ 2009-05-25 20:57:29.000000000 -0700 +++ vc-bzr.el 2009-07-26 10:25:30.000000000 -0700 @@ -457,7 +457,7 @@ REV non-nil gets an error." (remove-hook 'log-view-mode-hook 'vc-bzr-log-view-mode) ;Deactivate the hack. (require 'add-log) (set (make-local-variable 'log-view-per-file-logs) nil) - (set (make-local-variable 'log-view-file-re) "^Working file:[ \t]+\\(.+\\)") + (set (make-local-variable 'log-view-file-re) "\\`a\\`") (set (make-local-variable 'log-view-message-re) "^ *\\(?:revno: \\([0-9.]+\\)\\|merged: .+\\)") (set (make-local-variable 'log-view-font-lock-keywords) @@ -481,16 +481,11 @@ REV non-nil gets an error." ;; FIXME: `vc-bzr-command' runs `bzr log' with `LC_MESSAGES=C', so ;; the log display may not what the user wants - but I see no other ;; way of getting the above regexps working. - (dolist (file files) - (vc-exec-after - `(let ((inhibit-read-only t)) - (with-current-buffer buffer - ;; Insert the file name so that log-view.el can find it. - (insert "Working file: " ',file "\n")) ;; Like RCS/CVS. - (apply 'vc-bzr-command "log" ',buffer 'async ',file - ',(if (stringp vc-bzr-log-switches) - (list vc-bzr-log-switches) - vc-bzr-log-switches)))))) + (with-current-buffer buffer + (apply 'vc-bzr-command "log" buffer 'async files + (if (stringp vc-bzr-log-switches) + (list vc-bzr-log-switches) + vc-bzr-log-switches)))) (defun vc-bzr-show-log-entry (revision) "Find entry for patch name REVISION in bzr change log buffer."