emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs-25 2a4362b: Work around the asynchronous-empty-diff


From: Dmitry Gutov
Subject: [Emacs-diffs] emacs-25 2a4362b: Work around the asynchronous-empty-diff problem
Date: Sun, 22 Nov 2015 05:01:15 +0000

branch: emacs-25
commit 2a4362ba622a53683e9c6ea3e1b441d6f59af08f
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    Work around the asynchronous-empty-diff problem
    
    * lisp/vc/vc-rcs.el (vc-rcs-diff):
    * lisp/vc/vc-mtn.el (vc-mtn-diff):
    * lisp/vc/vc-hg.el (vc-hg-diff):
    * lisp/vc/vc-git.el (vc-git-diff): Ignore the ASYNC argument,
    do a synchronous process call (bug#21969).
---
 lisp/vc/vc-git.el |    4 ++--
 lisp/vc/vc-hg.el  |    6 +++---
 lisp/vc/vc-mtn.el |    4 ++--
 lisp/vc/vc-rcs.el |    5 +++--
 4 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index 8bf37f0..9908418 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -1050,7 +1050,7 @@ or BRANCH^ (where \"^\" can be repeated)."
 
 (autoload 'vc-switches "vc")
 
-(defun vc-git-diff (files &optional rev1 rev2 buffer async)
+(defun vc-git-diff (files &optional rev1 rev2 buffer _async)
   "Get a difference report using Git between two revisions of FILES."
   (let (process-file-side-effects
         (command "diff-tree"))
@@ -1061,7 +1061,7 @@ or BRANCH^ (where \"^\" can be repeated)."
       (unless rev1 (setq rev1 "HEAD")))
     (if vc-git-diff-switches
         (apply #'vc-git-command (or buffer "*vc-diff*")
-              (if async 'async 1)
+              1 ; bug#21969
               files
                command
                "--exit-code"
diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el
index 92b0c31..dd897ad 100644
--- a/lisp/vc/vc-hg.el
+++ b/lisp/vc/vc-hg.el
@@ -335,7 +335,7 @@ If LIMIT is non-nil, show no more than this many entries."
 
 (autoload 'vc-switches "vc")
 
-(defun vc-hg-diff (files &optional oldvers newvers buffer async)
+(defun vc-hg-diff (files &optional oldvers newvers buffer _async)
   "Get a difference report using hg between two revisions of FILES."
   (let* ((firstfile (car files))
          (working (and firstfile (vc-working-revision firstfile))))
@@ -345,8 +345,8 @@ If LIMIT is non-nil, show no more than this many entries."
       (setq oldvers working))
     (apply #'vc-hg-command
           (or buffer "*vc-diff*")
-          (if async 'async nil)
-          files "diff"
+           nil ; bug#21969
+           files "diff"
            (append
             (vc-switches 'hg 'diff)
             (when oldvers
diff --git a/lisp/vc/vc-mtn.el b/lisp/vc/vc-mtn.el
index b56a08f..3b59c61 100644
--- a/lisp/vc/vc-mtn.el
+++ b/lisp/vc/vc-mtn.el
@@ -253,10 +253,10 @@ If LIMIT is non-nil, show no more than this many entries."
 
 (autoload 'vc-switches "vc")
 
-(defun vc-mtn-diff (files &optional rev1 rev2 buffer async)
+(defun vc-mtn-diff (files &optional rev1 rev2 buffer _async)
   "Get a difference report using monotone between two revisions of FILES."
   (apply 'vc-mtn-command (or buffer "*vc-diff*")
-        (if async 'async 1)
+        1 ; bug#21969
         files "diff"
          (append
            (vc-switches 'mtn 'diff)
diff --git a/lisp/vc/vc-rcs.el b/lisp/vc/vc-rcs.el
index ba13364..3e43546 100644
--- a/lisp/vc/vc-rcs.el
+++ b/lisp/vc/vc-rcs.el
@@ -534,10 +534,11 @@ files beneath it."
     (vc-rcs-print-log-cleanup))
   (when limit 'limit-unsupported))
 
-(defun vc-rcs-diff (files &optional oldvers newvers buffer async)
+(defun vc-rcs-diff (files &optional oldvers newvers buffer _async)
   "Get a difference report using RCS between two sets of files."
   (apply #'vc-do-command (or buffer "*vc-diff*")
-        (if async 'async 1)
+        ;; The repo is local, so this is fast anyway.
+        1 ; bug#21969
         "rcsdiff" (vc-expand-dirs files 'RCS)
          (append (list "-q"
                        (and oldvers (concat "-r" oldvers))



reply via email to

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