1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-27 07:37:33 +00:00

(vc-hg-revision-completion-table, vc-hg-revision-table): Make it work when the

arg is a list of files.
This commit is contained in:
Stefan Monnier 2007-10-20 01:11:18 +00:00
parent 9f11ce4ec3
commit 87d1a48e20
2 changed files with 6 additions and 5 deletions

View File

@ -1,5 +1,6 @@
2007-10-20 Stefan Monnier <monnier@iro.umontreal.ca> 2007-10-20 Stefan Monnier <monnier@iro.umontreal.ca>
* vc-hg.el (vc-hg-revision-completion-table, vc-hg-revision-table):
* vc-git.el (vc-git-revision-completion-table, vc-git-revision-table): * vc-git.el (vc-git-revision-completion-table, vc-git-revision-table):
* vc-cvs.el (vc-cvs-revision-completion-table): * vc-cvs.el (vc-cvs-revision-completion-table):
* vc-arch.el (vc-arch-revision-completion-table): Make it work when the * vc-arch.el (vc-arch-revision-completion-table): Make it work when the

View File

@ -294,19 +294,19 @@
(list "-r" oldvers)) (list "-r" oldvers))
(list "")))))) (list ""))))))
(defun vc-hg-revision-table (file) (defun vc-hg-revision-table (files)
(let ((default-directory (file-name-directory file))) (let ((default-directory (file-name-directory (car files))))
(with-temp-buffer (with-temp-buffer
(vc-hg-command t nil file "log" "--template" "{rev} ") (vc-hg-command t nil file "log" "--template" "{rev} ")
(split-string (split-string
(buffer-substring-no-properties (point-min) (point-max)))))) (buffer-substring-no-properties (point-min) (point-max))))))
;; Modelled after the similar function in vc-cvs.el ;; Modelled after the similar function in vc-cvs.el
(defun vc-hg-revision-completion-table (file) (defun vc-hg-revision-completion-table (files)
(lexical-let ((file file) (lexical-let ((files files)
table) table)
(setq table (lazy-completion-table (setq table (lazy-completion-table
table (lambda () (vc-hg-revision-table file)))) table (lambda () (vc-hg-revision-table files))))
table)) table))
(defun vc-hg-diff-tree (file &optional oldvers newvers buffer) (defun vc-hg-diff-tree (file &optional oldvers newvers buffer)