diff options
| author | Dmitry Gutov | 2017-02-20 00:10:24 +0200 |
|---|---|---|
| committer | Dmitry Gutov | 2017-02-22 05:09:21 +0200 |
| commit | f5ee04277135ebaa67579dbbff430101627943a2 (patch) | |
| tree | e00b7d0801271db935033be458f10f406f5bcde9 | |
| parent | fb997d30af28da4712ca64876feddbd07db20e13 (diff) | |
| download | emacs-f5ee04277135ebaa67579dbbff430101627943a2.tar.gz emacs-f5ee04277135ebaa67579dbbff430101627943a2.zip | |
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).
| -rw-r--r-- | lisp/vc/vc.el | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 64e88de60eb..0c8492d021e 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 | |||
| 2163 | locked files at or below DIR (but if NAME is empty, locked files are | 2163 | locked files at or below DIR (but if NAME is empty, locked files are |
| 2164 | allowed and simply skipped)." | 2164 | allowed and simply skipped)." |
| 2165 | (interactive | 2165 | (interactive |
| 2166 | (let ((granularity | 2166 | (let* ((granularity |
| 2167 | (vc-call-backend (vc-responsible-backend default-directory) | 2167 | (vc-call-backend (vc-responsible-backend default-directory) |
| 2168 | 'revision-granularity))) | 2168 | 'revision-granularity)) |
| 2169 | (dir | ||
| 2170 | (if (eq granularity 'repository) | ||
| 2171 | ;; For VC's that do not work at file level, it's pointless | ||
| 2172 | ;; to ask for a directory, branches are created at repository level. | ||
| 2173 | ;; XXX: Either we call expand-file-name here, or use | ||
| 2174 | ;; file-in-directory-p inside vc-resynch-buffers-in-directory. | ||
| 2175 | (expand-file-name (vc-root-dir)) | ||
| 2176 | (read-directory-name "Directory: " default-directory nil t)))) | ||
| 2169 | (list | 2177 | (list |
| 2170 | (if (eq granularity 'repository) | 2178 | dir |
| 2171 | ;; For VC's that do not work at file level, it's pointless | 2179 | (vc-read-revision "Tag name to retrieve (default latest revisions): " |
| 2172 | ;; to ask for a directory, branches are created at repository level. | 2180 | (list dir) |
| 2173 | ;; XXX: Either we call expand-file-name here, or use | 2181 | (vc-responsible-backend dir))))) |
| 2174 | ;; file-in-directory-p inside vc-resynch-buffers-in-directory. | ||
| 2175 | (expand-file-name (vc-root-dir)) | ||
| 2176 | (read-directory-name "Directory: " default-directory default-directory t)) | ||
| 2177 | (read-string "Tag name to retrieve (default latest revisions): ")))) | ||
| 2178 | (let ((update (yes-or-no-p "Update any affected buffers? ")) | 2182 | (let ((update (yes-or-no-p "Update any affected buffers? ")) |
| 2179 | (msg (if (or (not name) (string= name "")) | 2183 | (msg (if (or (not name) (string= name "")) |
| 2180 | (format "Updating %s... " (abbreviate-file-name dir)) | 2184 | (format "Updating %s... " (abbreviate-file-name dir)) |