summaryrefslogtreecommitdiff
path: root/lisp/vc/vc.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/vc/vc.el')
-rw-r--r--lisp/vc/vc.el16
1 files changed, 15 insertions, 1 deletions
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 0c8492d021e..c5fe8aa6b1f 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -1757,6 +1757,9 @@ Return t if the buffer had changes, nil otherwise."
;; because we don't know that yet.
t)))
+(defvar vc-revision-history nil
+ "History for `vc-read-revision'.")
+
(defun vc-read-revision (prompt &optional files backend default initial-input)
(cond
((null files)
@@ -1768,7 +1771,7 @@ Return t if the buffer had changes, nil otherwise."
(vc-call-backend backend 'revision-completion-table files)))
(if completion-table
(completing-read prompt completion-table
- nil nil initial-input nil default)
+ nil nil initial-input 'vc-revision-history default)
(read-string prompt initial-input nil default))))
(defun vc-diff-build-argument-list-internal ()
@@ -2373,6 +2376,17 @@ When called interactively with a prefix argument, prompt for LIMIT."
(vc-print-log-internal backend (list rootdir) nil nil limit)))
;;;###autoload
+(defun vc-print-branch-log (branch)
+ (interactive
+ (list
+ (vc-read-revision "Branch to log: ")))
+ (when (equal branch "")
+ (error "No branch specified"))
+ (vc-print-log-internal (vc-responsible-backend default-directory)
+ (list default-directory) branch t
+ (when (> vc-log-show-limit 0) vc-log-show-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.
When called interactively with a prefix argument, prompt for REMOTE-LOCATION."