]> git.eshelyaron.com Git - emacs.git/commitdiff
* vc-dispatcher.el (vc-resynch-buffers-in-directory): Make sure
authorDan Nicolaescu <dann@ics.uci.edu>
Fri, 24 Jul 2009 05:41:17 +0000 (05:41 +0000)
committerDan Nicolaescu <dann@ics.uci.edu>
Fri, 24 Jul 2009 05:41:17 +0000 (05:41 +0000)
the buffer we try to sync is current when calling
vc-resynch-buffer.

* vc-dir.el (vc-dir-resynch-file): Make sure vc-dir-update does
not show up to date files.

lisp/ChangeLog
lisp/vc-dir.el
lisp/vc-dispatcher.el

index 6e1b5ef28190da363524f9fa017ce63f9a18cb15..b6e647f9097b3c1372ccfa8d9b1abbae1980171b 100644 (file)
@@ -1,3 +1,12 @@
+2009-07-24  Dan Nicolaescu  <dann@ics.uci.edu>
+
+       * vc-dispatcher.el (vc-resynch-buffers-in-directory): Make sure
+       the buffer we try to sync is current when calling
+       vc-resynch-buffer.
+
+       * vc-dir.el (vc-dir-resynch-file): Make sure vc-dir-update does
+       not show up to date files.
+
 2009-07-24  Glenn Morris  <rgm@gnu.org>
 
        * emacs-lisp/elint.el (elint-current-buffer, elint-defun):
index 4316caeade1375665340636c73e738455a654f7e..2c1138f858ff57f4cc798737eac4aec72a568b9d 100644 (file)
@@ -866,9 +866,10 @@ If it is a file, return the corresponding cons for the file itself."
            (when (vc-string-prefix-p ddir file)
              (if (file-directory-p file)
                  (vc-dir-resync-directory-files file)
-               (vc-dir-update
-                (list (vc-dir-recompute-file-state file ddir))
-                status-buf)))))))
+               (let ((state (vc-dir-recompute-file-state file ddir)))
+                 (vc-dir-update
+                  (list state)
+                  status-buf (eq (cadr state) 'up-to-date)))))))))
     ;; We didn't find any vc-dir buffers, remove the hook, it is
     ;; not needed.
     (unless found-vc-dir-buf
index c51a4896b7649b5d08d12fa5d77afe85b8d40543..f03f16ede98cb9a5f9a01b1f610208e56a58987f 100644 (file)
@@ -484,7 +484,8 @@ editing!"
   (dolist (buffer (buffer-list))
     (let ((fname (buffer-file-name buffer)))
       (when (and fname (vc-string-prefix-p directory fname))
-       (vc-resynch-buffer fname keep noquery)))))
+       (with-current-buffer buffer
+         (vc-resynch-buffer fname keep noquery))))))
 
 (defun vc-resynch-buffer (file &optional keep noquery)
   "If FILE is currently visited, resynch its buffer."