emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r101776: Make 'g' (AKA revert-buffer)


From: Dan Nicolaescu
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r101776: Make 'g' (AKA revert-buffer) rerun the VC log, log-incoming and
Date: Sun, 03 Oct 2010 17:26:41 -0700
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 101776
committer: Dan Nicolaescu <address@hidden>
branch nick: trunk
timestamp: Sun 2010-10-03 17:26:41 -0700
message:
  Make 'g' (AKA revert-buffer) rerun the VC log, log-incoming and
  log-outgoing commands.
  * lisp/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.
modified:
  lisp/ChangeLog
  lisp/vc/vc.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-10-03 22:37:37 +0000
+++ b/lisp/ChangeLog    2010-10-04 00:26:41 +0000
@@ -1,3 +1,12 @@
+2010-10-03  Dan Nicolaescu  <address@hidden>
+
+       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  <address@hidden>
 
        * net/gnutls.el (starttls-negotiate): Use the plist interface to

=== modified file 'lisp/vc/vc.el'
--- a/lisp/vc/vc.el     2010-10-03 21:05:47 +0000
+++ b/lisp/vc/vc.el     2010-10-04 00:26:41 +0000
@@ -2027,8 +2027,10 @@
     (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
@@ -2039,7 +2041,9 @@
         (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.")
@@ -2051,7 +2055,8 @@
                               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))
@@ -2062,7 +2067,9 @@
       ;; 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)
@@ -2080,7 +2087,14 @@
        (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)
@@ -2140,8 +2154,11 @@
 
 ;;;###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
@@ -2150,8 +2167,11 @@
 
 ;;;###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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]