aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Tromey2017-02-15 05:12:18 -0700
committerTom Tromey2017-02-19 21:01:28 -0700
commit0a670690f19bf263dadfe387e5bb22311e3b5231 (patch)
tree3b8e79c48aeea0349aa1c10e2b1b30d7900e49f3
parenta4c3227230fbdbcb324313b6aae067ad284f8239 (diff)
downloademacs-0a670690f19bf263dadfe387e5bb22311e3b5231.tar.gz
emacs-0a670690f19bf263dadfe387e5bb22311e3b5231.zip
vc-log-outgoing fixes for git; add binding to vc-dir
* lisp/vc/vc-dir.el (vc-dir-mode-map): Bind "O" to vc-log-outgoing. * lisp/vc/vc-git.el (vc-git-log-outgoing, vc-git-log-incoming): Use async execution. (vc-git-log-view-mode): Also truncate lines for log-outgoing and log-incoming. * lisp/vc/vc.el (vc-log-incoming, vc-log-outgoing): Don't pass nil as remote-location argument.
-rw-r--r--lisp/vc/vc-dir.el1
-rw-r--r--lisp/vc/vc-git.el6
-rw-r--r--lisp/vc/vc.el8
3 files changed, 8 insertions, 7 deletions
diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el
index b7eb8b592d1..21bd21e15de 100644
--- a/lisp/vc/vc-dir.el
+++ b/lisp/vc/vc-dir.el
@@ -255,6 +255,7 @@ See `run-hooks'."
255 (define-key map "l" 'vc-print-log) ;; C-x v l 255 (define-key map "l" 'vc-print-log) ;; C-x v l
256 (define-key map "L" 'vc-print-root-log) ;; C-x v L 256 (define-key map "L" 'vc-print-root-log) ;; C-x v L
257 (define-key map "I" 'vc-log-incoming) ;; C-x v I 257 (define-key map "I" 'vc-log-incoming) ;; C-x v I
258 (define-key map "O" 'vc-log-outgoing) ;; C-x v O
258 ;; More confusing than helpful, probably 259 ;; More confusing than helpful, probably
259 ;;(define-key map "R" 'vc-revert) ;; u is taken by vc-dir-unmark. 260 ;;(define-key map "R" 'vc-revert) ;; u is taken by vc-dir-unmark.
260 ;;(define-key map "A" 'vc-annotate) ;; g is taken by revert-buffer 261 ;;(define-key map "A" 'vc-annotate) ;; g is taken by revert-buffer
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index 8a22d747b7d..1a3f1bf2f48 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -972,7 +972,7 @@ If LIMIT is non-nil, show no more than this many entries."
972(defun vc-git-log-outgoing (buffer remote-location) 972(defun vc-git-log-outgoing (buffer remote-location)
973 (interactive) 973 (interactive)
974 (vc-git-command 974 (vc-git-command
975 buffer 0 nil 975 buffer 'async nil
976 "log" 976 "log"
977 "--no-color" "--graph" "--decorate" "--date=short" 977 "--no-color" "--graph" "--decorate" "--date=short"
978 (format "--pretty=tformat:%s" (car vc-git-root-log-format)) 978 (format "--pretty=tformat:%s" (car vc-git-root-log-format))
@@ -986,7 +986,7 @@ If LIMIT is non-nil, show no more than this many entries."
986 (interactive) 986 (interactive)
987 (vc-git-command nil 0 nil "fetch") 987 (vc-git-command nil 0 nil "fetch")
988 (vc-git-command 988 (vc-git-command
989 buffer 0 nil 989 buffer 'async nil
990 "log" 990 "log"
991 "--no-color" "--graph" "--decorate" "--date=short" 991 "--no-color" "--graph" "--decorate" "--date=short"
992 (format "--pretty=tformat:%s" (car vc-git-root-log-format)) 992 (format "--pretty=tformat:%s" (car vc-git-root-log-format))
@@ -1011,7 +1011,7 @@ If LIMIT is non-nil, show no more than this many entries."
1011 (cadr vc-git-root-log-format) 1011 (cadr vc-git-root-log-format)
1012 "^commit *\\([0-9a-z]+\\)")) 1012 "^commit *\\([0-9a-z]+\\)"))
1013 ;; Allow expanding short log entries. 1013 ;; Allow expanding short log entries.
1014 (when (eq vc-log-view-type 'short) 1014 (when (memq vc-log-view-type '(short log-outgoing log-incoming))
1015 (setq truncate-lines t) 1015 (setq truncate-lines t)
1016 (set (make-local-variable 'log-view-expanded-log-entry-function) 1016 (set (make-local-variable 'log-view-expanded-log-entry-function)
1017 'vc-git-expanded-log-entry)) 1017 'vc-git-expanded-log-entry))
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index c3088560c11..64e88de60eb 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -2378,8 +2378,8 @@ When called interactively with a prefix argument, prompt for REMOTE-LOCATION."
2378 (let ((backend (vc-deduce-backend))) 2378 (let ((backend (vc-deduce-backend)))
2379 (unless backend 2379 (unless backend
2380 (error "Buffer is not version controlled")) 2380 (error "Buffer is not version controlled"))
2381 (vc-incoming-outgoing-internal backend remote-location "*vc-incoming*" 2381 (vc-incoming-outgoing-internal backend (or remote-location "")
2382 'log-incoming))) 2382 "*vc-incoming*" 'log-incoming)))
2383 2383
2384;;;###autoload 2384;;;###autoload
2385(defun vc-log-outgoing (&optional remote-location) 2385(defun vc-log-outgoing (&optional remote-location)
@@ -2391,8 +2391,8 @@ When called interactively with a prefix argument, prompt for REMOTE-LOCATION."
2391 (let ((backend (vc-deduce-backend))) 2391 (let ((backend (vc-deduce-backend)))
2392 (unless backend 2392 (unless backend
2393 (error "Buffer is not version controlled")) 2393 (error "Buffer is not version controlled"))
2394 (vc-incoming-outgoing-internal backend remote-location "*vc-outgoing*" 2394 (vc-incoming-outgoing-internal backend (or remote-location "")
2395 'log-outgoing))) 2395 "*vc-outgoing*" 'log-outgoing)))
2396 2396
2397;;;###autoload 2397;;;###autoload
2398(defun vc-region-history (from to) 2398(defun vc-region-history (from to)