emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r105066: * vc/vc.el (vc-diff-internal


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r105066: * vc/vc.el (vc-diff-internal): Fix race condition (Bug#1256).
Date: Sat, 09 Jul 2011 21:42:39 -0400
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 105066
author: Bob Rogers <address@hidden>
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Sat 2011-07-09 21:42:39 -0400
message:
  * vc/vc.el (vc-diff-internal): Fix race condition (Bug#1256).
modified:
  lisp/ChangeLog
  lisp/vc/vc.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-07-10 01:40:32 +0000
+++ b/lisp/ChangeLog    2011-07-10 01:42:39 +0000
@@ -1,3 +1,7 @@
+2011-07-10  Bob Rogers  <address@hidden>
+
+       * vc/vc.el (vc-diff-internal): Fix race condition (Bug#1256).
+
 2011-07-10  Chong Yidong  <address@hidden>
 
        * window.el (display-buffer): Fix arguments to

=== modified file 'lisp/vc/vc.el'
--- a/lisp/vc/vc.el     2011-07-03 01:15:38 +0000
+++ b/lisp/vc/vc.el     2011-07-10 01:42:39 +0000
@@ -1605,10 +1605,13 @@
       ;; bindings are nicer for read only buffers. pcl-cvs does the
       ;; same thing.
       (setq buffer-read-only t)
-      (vc-exec-after `(vc-diff-finish ,(current-buffer) ',(when verbose
-                                                            messages)))
       ;; Display the buffer, but at the end because it can change point.
       (pop-to-buffer (current-buffer))
+      ;; The diff process may finish early, so call `vc-diff-finish'
+      ;; after `pop-to-buffer'; the former assumes the diff buffer is
+      ;; shown in some window.
+      (vc-exec-after `(vc-diff-finish ,(current-buffer)
+                                     ',(when verbose messages)))
       ;; In the async case, we return t even if there are no differences
       ;; because we don't know that yet.
       t)))


reply via email to

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