bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#25714: 25.1.91; make "update" flag work with vc-retrieve-tag in git


From: Dmitry Gutov
Subject: bug#25714: 25.1.91; make "update" flag work with vc-retrieve-tag in git and hg
Date: Tue, 14 Feb 2017 03:47:35 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0

On 14.02.2017 03:32, Tom Tromey wrote:
"Dmitry" == Dmitry Gutov <dgutov@yandex.ru> writes:

Dmitry> Any idea why the (vc-resynch-buffer dir t t t) call at the end of
Dmitry> vc-retrieve-tag doesn't do the job?

I must have tested incorrectly, because when I revert my patch, it still
seems to work now :(
Sorry about that.  Maybe you should try it to be sure.

It works on the current buffer, but not on all files in the repository if you are not at the top level. Aside from comments, maybe the patch should look like this:

diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index c66a092..085d781 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -2170,7 +2170,9 @@ vc-retrieve-tag
       (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.
-         default-directory
+          ;; 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): "))))
   (let ((update (yes-or-no-p "Update any affected buffers? "))






reply via email to

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