emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master f5ee042: Use revision-completion-table in vc-retrie


From: Dmitry Gutov
Subject: [Emacs-diffs] master f5ee042: Use revision-completion-table in vc-retrieve-tag
Date: Tue, 21 Feb 2017 22:09:28 -0500 (EST)

branch: master
commit f5ee04277135ebaa67579dbbff430101627943a2
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    Use revision-completion-table in vc-retrieve-tag
    
    * lisp/vc/vc.el (vc-retrieve-tag): Use the
    revision-completion-table command for completion (bug#25710).
---
 lisp/vc/vc.el | 26 +++++++++++++++-----------
 1 file changed, 15 insertions(+), 11 deletions(-)

diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 64e88de..0c8492d 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -2163,18 +2163,22 @@ If locking is used for the files in DIR, then there 
must not be any
 locked files at or below DIR (but if NAME is empty, locked files are
 allowed and simply skipped)."
   (interactive
-   (let ((granularity
-         (vc-call-backend (vc-responsible-backend default-directory)
-                          'revision-granularity)))
+   (let* ((granularity
+           (vc-call-backend (vc-responsible-backend default-directory)
+                            'revision-granularity))
+          (dir
+           (if (eq granularity 'repository)
+               ;; For VC's that do not work at file level, it's pointless
+               ;; to ask for a directory, branches are created at repository 
level.
+               ;; XXX: Either we call expand-file-name here, or use
+               ;; file-in-directory-p inside vc-resynch-buffers-in-directory.
+               (expand-file-name (vc-root-dir))
+             (read-directory-name "Directory: " default-directory nil t))))
      (list
-      (if (eq granularity 'repository)
-         ;; For VC's that do not work at file level, it's pointless
-         ;; to ask for a directory, branches are created at repository level.
-          ;; XXX: Either we call expand-file-name here, or use
-          ;; file-in-directory-p inside vc-resynch-buffers-in-directory.
-         (expand-file-name (vc-root-dir))
-       (read-directory-name "Directory: " default-directory default-directory 
t))
-      (read-string "Tag name to retrieve (default latest revisions): "))))
+      dir
+      (vc-read-revision "Tag name to retrieve (default latest revisions): "
+                        (list dir)
+                        (vc-responsible-backend dir)))))
   (let ((update (yes-or-no-p "Update any affected buffers? "))
        (msg (if (or (not name) (string= name ""))
                 (format "Updating %s... " (abbreviate-file-name dir))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]