unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* improve vc-bzr-print-log
@ 2009-07-26 17:28 Dan Nicolaescu
  2009-07-26 19:37 ` Chong Yidong
  2009-07-27  2:50 ` Stefan Monnier
  0 siblings, 2 replies; 7+ messages in thread
From: Dan Nicolaescu @ 2009-07-26 17:28 UTC (permalink / raw)
  To: emacs-devel


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."




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-08-13 17:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-26 17:28 improve vc-bzr-print-log Dan Nicolaescu
2009-07-26 19:37 ` Chong Yidong
2009-07-26 21:55   ` Dan Nicolaescu
2009-07-27  1:54     ` Stephen J. Turnbull
2009-08-13 17:28     ` Chong Yidong
2009-08-13 17:40       ` Dan Nicolaescu
2009-07-27  2:50 ` Stefan Monnier

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).