+2010-10-03 Dan Nicolaescu <dann@ics.uci.edu>
+
+ Make 'g' (AKA revert-buffer) rerun the VC log, log-incoming and
+ log-outgoing commands.
+ * vc/vc.el (vc-log-internal-common): Add a new argument and use it
+ to create a buffer local revert-buffer-function variable.
+ (vc-print-log-internal, vc-log-incoming, vc-log-outgoing): Pass a
+ revert-buffer-function lambda.
+
2010-10-03 Teodor Zlatanov <tzz@lifelogs.com>
* net/gnutls.el (starttls-negotiate): Use the plist interface to
(setq type (if vc-short-log 'short 'long))
(lexical-let
((working-revision working-revision)
+ (backend backend)
(limit limit)
(shortlog vc-short-log)
+ (files files)
(is-start-revision is-start-revision))
(vc-log-internal-common
backend buffer-name files type
(vc-print-log-setup-buttons working-revision
is-start-revision limit ret))
(lambda (bk)
- (vc-call-backend bk 'show-log-entry working-revision))))))
+ (vc-call-backend bk 'show-log-entry working-revision))
+ (lambda (ignore-auto noconfirm)
+ (vc-print-log-internal backend files working-revision is-start-revision limit))))))
(defvar vc-log-view-type nil
"Set this to differentiate the different types of logs.")
type
backend-func
setup-buttons-func
- goto-location-func)
+ goto-location-func
+ rev-buff-func)
(let (retval)
(with-current-buffer (get-buffer-create buffer-name)
(set (make-local-variable 'vc-log-view-type) type))
;; to t, so let's keep doing it, just in case.
(vc-call-backend backend 'log-view-mode)
(set (make-local-variable 'log-view-vc-backend) backend)
- (set (make-local-variable 'log-view-vc-fileset) files))
+ (set (make-local-variable 'log-view-vc-fileset) files)
+ (set (make-local-variable 'revert-buffer-function)
+ rev-buff-func))
(vc-exec-after
`(let ((inhibit-read-only t))
(funcall ',setup-buttons-func ',backend ',files ',retval)
(vc-call-backend bk type-arg buf remote-location)))
(lambda (bk files-arg ret))
(lambda (bk)
- (goto-char (point-min)))))
+ (goto-char (point-min)))
+ (lexical-let
+ ((backend backend)
+ (remote-location remote-location)
+ (buffer-name buffer-name)
+ (type type))
+ (lambda (ignore-auto noconfirm)
+ (vc-incoming-outgoing-internal backend remote-location buffer-name type)))))
;;;###autoload
(defun vc-print-log (&optional working-revision limit)
;;;###autoload
(defun vc-log-incoming (&optional remote-location)
- "Show a log of changes that will be received with a pull operation from REMOTE-LOCATION."
- (interactive "sRemote location (empty for default): ")
+ "Show a log of changes that will be received with a pull operation from REMOTE-LOCATION.
+When called interactively with a prefix argument, prompt for REMOTE-LOCATION.."
+ (interactive
+ (when current-prefix-arg
+ (list (read-string "Remote location (empty for default): "))))
(let ((backend (vc-deduce-backend))
rootdir working-revision)
(unless backend
;;;###autoload
(defun vc-log-outgoing (&optional remote-location)
- "Show a log of changes that will be sent with a push operation to REMOTE-LOCATION."
- (interactive "sRemote location (empty for default): ")
+ "Show a log of changes that will be sent with a push operation to REMOTE-LOCATION.
+When called interactively with a prefix argument, prompt for REMOTE-LOCATION."
+ (interactive
+ (when current-prefix-arg
+ (list (read-string "Remote location (empty for default): "))))
(let ((backend (vc-deduce-backend))
rootdir working-revision)
(unless backend