]> git.eshelyaron.com Git - emacs.git/commitdiff
(vc-hg-revision-completion-table, vc-hg-revision-table): Make it work when the
authorStefan Monnier <monnier@iro.umontreal.ca>
Sat, 20 Oct 2007 01:11:18 +0000 (01:11 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sat, 20 Oct 2007 01:11:18 +0000 (01:11 +0000)
arg is a list of files.

lisp/ChangeLog
lisp/vc-hg.el

index eb6859e2fe7fba92036354ceb955a7af25f18fae..eeec0e278ca54288dac9658420f2c62775270de5 100644 (file)
@@ -1,5 +1,6 @@
 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-cvs.el (vc-cvs-revision-completion-table):
        * vc-arch.el (vc-arch-revision-completion-table): Make it work when the
index 2e90d06fbc57ce455730b27156046369b0059a1c..8e9cf15688b5d1141b3527bda31ce2451a420dcc 100644 (file)
                  (list "-r" oldvers))
              (list ""))))))
 
-(defun vc-hg-revision-table (file)
-  (let ((default-directory (file-name-directory file)))
+(defun vc-hg-revision-table (files)
+  (let ((default-directory (file-name-directory (car files))))
     (with-temp-buffer
       (vc-hg-command t nil file "log" "--template" "{rev} ")
       (split-string 
        (buffer-substring-no-properties (point-min) (point-max))))))
 
 ;; Modelled after the similar function in vc-cvs.el
-(defun vc-hg-revision-completion-table (file)
-  (lexical-let ((file file)
+(defun vc-hg-revision-completion-table (files)
+  (lexical-let ((files files)
                 table)
     (setq table (lazy-completion-table
-                 table (lambda () (vc-hg-revision-table file))))
+                 table (lambda () (vc-hg-revision-table files))))
     table))
 
 (defun vc-hg-diff-tree (file &optional oldvers newvers buffer)