summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/vc/vc-dir.el6
-rw-r--r--lisp/vc/vc.el16
2 files changed, 21 insertions, 1 deletions
diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el
index 21bd21e15de..0363aab8407 100644
--- a/lisp/vc/vc-dir.el
+++ b/lisp/vc/vc-dir.el
@@ -297,6 +297,12 @@ See `run-hooks'."
(define-key map (kbd "M-s a M-C-s") 'vc-dir-isearch-regexp)
(define-key map "G" 'vc-dir-ignore)
+ (let ((branch-map (make-sparse-keymap)))
+ (define-key map "B" branch-map)
+ (define-key branch-map "c" 'vc-create-tag)
+ (define-key branch-map "l" 'vc-print-branch-log)
+ (define-key branch-map "s" 'vc-retrieve-tag))
+
;; Hook up the menu.
(define-key map [menu-bar vc-dir-mode]
`(menu-item
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."