comparison lisp/vc-bzr.el @ 104086:1bce2f053aeb

(vc-bzr-print-log): Pass multiple arguments to bzr log. (vc-bzr-log-view-mode): Adjust log-view-file-re.
author Dan Nicolaescu <dann@ics.uci.edu>
date Mon, 27 Jul 2009 17:50:22 +0000
parents b4e12b7edf39
children cfc336042c1b
comparison
equal deleted inserted replaced
104085:6298508aee59 104086:1bce2f053aeb
455 455
456 (define-derived-mode vc-bzr-log-view-mode log-view-mode "Bzr-Log-View" 456 (define-derived-mode vc-bzr-log-view-mode log-view-mode "Bzr-Log-View"
457 (remove-hook 'log-view-mode-hook 'vc-bzr-log-view-mode) ;Deactivate the hack. 457 (remove-hook 'log-view-mode-hook 'vc-bzr-log-view-mode) ;Deactivate the hack.
458 (require 'add-log) 458 (require 'add-log)
459 (set (make-local-variable 'log-view-per-file-logs) nil) 459 (set (make-local-variable 'log-view-per-file-logs) nil)
460 (set (make-local-variable 'log-view-file-re) "^Working file:[ \t]+\\(.+\\)") 460 (set (make-local-variable 'log-view-file-re) "\\`a\\`")
461 (set (make-local-variable 'log-view-message-re) 461 (set (make-local-variable 'log-view-message-re)
462 "^ *\\(?:revno: \\([0-9.]+\\)\\|merged: .+\\)") 462 "^ *\\(?:revno: \\([0-9.]+\\)\\|merged: .+\\)")
463 (set (make-local-variable 'log-view-font-lock-keywords) 463 (set (make-local-variable 'log-view-font-lock-keywords)
464 ;; log-view-font-lock-keywords is careful to use the buffer-local 464 ;; log-view-font-lock-keywords is careful to use the buffer-local
465 ;; value of log-view-message-re only since Emacs-23. 465 ;; value of log-view-message-re only since Emacs-23.
479 ;; If the buffer exists from a previous invocation it might be 479 ;; If the buffer exists from a previous invocation it might be
480 ;; read-only. 480 ;; read-only.
481 ;; FIXME: `vc-bzr-command' runs `bzr log' with `LC_MESSAGES=C', so 481 ;; FIXME: `vc-bzr-command' runs `bzr log' with `LC_MESSAGES=C', so
482 ;; the log display may not what the user wants - but I see no other 482 ;; the log display may not what the user wants - but I see no other
483 ;; way of getting the above regexps working. 483 ;; way of getting the above regexps working.
484 (dolist (file files) 484 (with-current-buffer buffer
485 (vc-exec-after 485 (apply 'vc-bzr-command "log" buffer 'async files
486 `(let ((inhibit-read-only t)) 486 (if (stringp vc-bzr-log-switches)
487 (with-current-buffer buffer 487 (list vc-bzr-log-switches)
488 ;; Insert the file name so that log-view.el can find it. 488 vc-bzr-log-switches))))
489 (insert "Working file: " ',file "\n")) ;; Like RCS/CVS.
490 (apply 'vc-bzr-command "log" ',buffer 'async ',file
491 ',(if (stringp vc-bzr-log-switches)
492 (list vc-bzr-log-switches)
493 vc-bzr-log-switches))))))
494 489
495 (defun vc-bzr-show-log-entry (revision) 490 (defun vc-bzr-show-log-entry (revision)
496 "Find entry for patch name REVISION in bzr change log buffer." 491 "Find entry for patch name REVISION in bzr change log buffer."
497 (goto-char (point-min)) 492 (goto-char (point-min))
498 (when revision 493 (when revision