]> code.delx.au - gnu-emacs/commitdiff
Move VC diff ASYNC argument to the fifth position
authorDmitry Gutov <dgutov@yandex.ru>
Sun, 14 Dec 2014 10:49:08 +0000 (12:49 +0200)
committerDmitry Gutov <dgutov@yandex.ru>
Sun, 14 Dec 2014 10:49:08 +0000 (12:49 +0200)
* lisp/vc/vc-svn.el (vc-svn-diff):
* lisp/vc/vc-src.el (vc-src-diff):
* lisp/vc/vc-sccs.el (vc-sccs-diff):
* 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):
* lisp/vc/vc-dav.el (vc-dav-diff):
* lisp/vc/vc-cvs.el (vc-cvs-diff):
* lisp/vc/vc-bzr.el (vc-bzr-diff):
* lisp/obsolete/vc-arch.el (vc-arch-diff): Move ASYNC argument to the end.

* lisp/vc/vc.el (vc-diff-internal): Pass `async' argument to the
backend `diff' command in the last position.

13 files changed:
lisp/ChangeLog
lisp/obsolete/vc-arch.el
lisp/vc/vc-bzr.el
lisp/vc/vc-cvs.el
lisp/vc/vc-dav.el
lisp/vc/vc-git.el
lisp/vc/vc-hg.el
lisp/vc/vc-mtn.el
lisp/vc/vc-rcs.el
lisp/vc/vc-sccs.el
lisp/vc/vc-src.el
lisp/vc/vc-svn.el
lisp/vc/vc.el

index 37f637b503ac0489ee4e05390865b7cbdf868c06..cb43a9b732fa47563794f55ed9193a38b149e932 100644 (file)
@@ -1,3 +1,24 @@
+2014-12-14  Dmitry Gutov  <dgutov@yandex.ru>
+
+       Move ASYNC argument to the `diff' VC command to the fifth
+       position, for better compatibility with existing third-party code,
+       and document it.
+
+       * vc/vc.el (vc-diff-internal): Pass `async' argument to the
+       backend `diff' command in the last position.
+
+       * vc/vc-svn.el (vc-svn-diff):
+       * vc/vc-src.el (vc-src-diff):
+       * vc/vc-sccs.el (vc-sccs-diff):
+       * vc/vc-rcs.el (vc-rcs-diff):
+       * vc/vc-mtn.el (vc-mtn-diff):
+       * vc/vc-hg.el (vc-hg-diff):
+       * vc/vc-git.el (vc-git-diff):
+       * vc/vc-dav.el (vc-dav-diff):
+       * vc/vc-cvs.el (vc-cvs-diff):
+       * vc/vc-bzr.el (vc-bzr-diff):
+       * obsolete/vc-arch.el (vc-arch-diff): Move ASYNC argument to the end.
+
 2014-12-13  Andreas Schwab  <schwab@linux-m68k.org>
 
        * net/shr.el (shr-next-link): Don't error out at eob.
index d1344f2b1ccd2a1b993ec178d9a721cb8a740abf..c1ac505270c8d5a1d2f4a0ed0acb67c044d93d3b 100644 (file)
@@ -448,7 +448,7 @@ CALLBACK expects (ENTRIES &optional MORE-TO-COME); see
     (vc-arch-command nil 0 files "commit" "-s" summary "-L" comment "--"
                     (vc-switches 'Arch 'checkin))))
 
-(defun vc-arch-diff (files &optional async oldvers newvers buffer)
+(defun vc-arch-diff (files &optional oldvers newvers buffer async)
   "Get a difference report using Arch between two versions of FILES."
   ;; FIXME: This implementation only works for singleton filesets.  To make
   ;; it work for more cases, we have to either call `file-diffs' manually on
index 1963f4e39acc5c4daed3c92cd24badedc83ab689..de10164980289384eae929b1a1bce0840a0ad262 100644 (file)
@@ -767,7 +767,7 @@ If LIMIT is non-nil, show no more than this many entries."
 
 (autoload 'vc-switches "vc")
 
-(defun vc-bzr-diff (files &optional async rev1 rev2 buffer)
+(defun vc-bzr-diff (files &optional rev1 rev2 buffer async)
   "VC bzr backend for diff."
   (let* ((switches (vc-switches 'bzr 'diff))
          (args
index a5b50c16e0976463f64273a51d6ccbedfbf918e1..c1d32cea6059b6e88c25ef66f4f351b337654b92 100644 (file)
@@ -569,7 +569,7 @@ Remaining arguments are ignored."
 (autoload 'vc-version-backup-file "vc")
 (declare-function vc-coding-system-for-diff "vc" (file))
 
-(defun vc-cvs-diff (files &optional async oldvers newvers buffer)
+(defun vc-cvs-diff (files &optional oldvers newvers buffer async)
   "Get a difference report using CVS between two revisions of FILE."
   (let* (process-file-side-effects
         (async (and async (vc-cvs-stay-local-p files)))
index 4c3fe6abff7f3bc6fa3177a0707ab8528022082c..f107764f4049397e2ef27ba197faab3a9fb43b66 100644 (file)
@@ -117,7 +117,7 @@ only needs to update the status of URL within the backend.
   "Insert the revision log of URL into the *vc* buffer."
   )
 
-(defun vc-dav-diff (url &optional async rev1 rev2)
+(defun vc-dav-diff (url &optional rev1 rev2 buffer async)
   "Insert the diff for URL into the *vc-diff* buffer.
 If REV1 and REV2 are non-nil report differences from REV1 to REV2.
 If REV1 is nil, use the current workfile version as the older version.
index c41dde1b3dba20ae04fc443ec1cc4c32e031cfe7..65f683c780806d739f42a76b8763a6c20c10123b 100644 (file)
@@ -78,7 +78,7 @@
 ;; - show-log-entry (revision)                     OK
 ;; - comment-history (file)                        ??
 ;; - update-changelog (files)                      COULD BE SUPPORTED
-;; * diff (file &optional rev1 rev2 buffer)        OK
+;; * diff (file &optional rev1 rev2 buffer async)  OK
 ;; - revision-completion-table (files)             OK
 ;; - annotate-command (file buf &optional rev)     OK
 ;; - annotate-time ()                              OK
@@ -977,7 +977,7 @@ or BRANCH^ (where \"^\" can be repeated)."
 
 (autoload 'vc-switches "vc")
 
-(defun vc-git-diff (files &optional async rev1 rev2 buffer)
+(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)
     (if vc-git-diff-switches
index 0d9f9f182fa08b211340ac6112a6f47054d8c315..e65009db2efa738a359fb034e03625b3034009ed 100644 (file)
@@ -313,7 +313,7 @@ If LIMIT is non-nil, show no more than this many entries."
 
 (autoload 'vc-switches "vc")
 
-(defun vc-hg-diff (files &optional async oldvers newvers buffer)
+(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))))
index 7d2f734989711e37e599498701283a7a2c1e8419..d1736a42a3d45238feef64ad3e83bfac67b87df5 100644 (file)
@@ -236,7 +236,7 @@ If LIMIT is non-nil, show no more than this many entries."
 
 (autoload 'vc-switches "vc")
 
-(defun vc-mtn-diff (files &optional async rev1 rev2 buffer)
+(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)
index 8866bdbad96353e8e416d4f5d60d8d7e632ae745..cb3d36f13fb2d93184d49fb7a6654d549f6123c1 100644 (file)
@@ -535,7 +535,7 @@ files beneath it."
     (vc-rcs-print-log-cleanup))
   (when limit 'limit-unsupported))
 
-(defun vc-rcs-diff (files &optional async oldvers newvers buffer)
+(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)
index 63628647fd44b00869439fc4c6a420610cd8bb81..cfd3cccf9b1b900463ceff5f708554c3980249d1 100644 (file)
@@ -316,7 +316,7 @@ Remaining arguments are ignored."
 (defvar w32-quote-process-args)
 
 ;; FIXME use sccsdiff if present?
-(defun vc-sccs-diff (files &optional _async oldvers newvers buffer)
+(defun vc-sccs-diff (files &optional oldvers newvers buffer _async)
   "Get a difference report using SCCS between two filesets."
   (setq files (vc-expand-dirs files 'SCCS))
   (setq oldvers (vc-sccs-lookup-triple (car files) oldvers))
index 539437d185ce7b0672afc93ace66c282c3f62b22..50c0a7ef1b0d99276be31da95ba4416e584163e3 100644 (file)
@@ -288,7 +288,7 @@ If LIMIT is non-nil, show no more than this many entries."
              (when limit (list "-l" (format "%s" limit)))
              vc-src-log-switches)))))
 
-(defun vc-src-diff (files &optional _async oldvers newvers buffer)
+(defun vc-src-diff (files &optional oldvers newvers buffer _async)
   "Get a difference report using src between two revisions of FILES."
   (let* ((firstfile (car files))
          (working (and firstfile (vc-working-revision firstfile))))
index 5db26767fda0b616d81c1cb5f385c403e47a4e49..eedccd81d4c22fecdc2c646c224c8d495efa01d2 100644 (file)
@@ -548,7 +548,7 @@ If LIMIT is non-nil, show no more than this many entries."
                 (if start-revision (format "-r%s" start-revision) "-rHEAD:0"))
                (when limit (list "--limit" (format "%s" limit)))))))))
 
-(defun vc-svn-diff (files &optional async oldvers newvers buffer)
+(defun vc-svn-diff (files &optional oldvers newvers buffer async)
   "Get a difference report using SVN between two revisions of fileset FILES."
   (and oldvers
        (not newvers)
index b8be3ff7df2c8d08d3505b95aa8bb4e537c29067..954b3cfeb027e004f69ea8ce454721d465ad003c 100644 (file)
 ;;   default implementation runs rcs2log, which handles RCS- and
 ;;   CVS-style logs.
 ;;
-;; * diff (files &optional async rev1 rev2 buffer)
+;; * diff (files &optional rev1 rev2 buffer async)
 ;;
 ;;   Insert the diff for FILE into BUFFER, or the *vc-diff* buffer if
-;;   BUFFER is nil.  If ASYNC is non-nil, run asynchronously.If REV1
+;;   BUFFER is nil.  If ASYNC is non-nil, run asynchronously.  If REV1
 ;;   and REV2 are non-nil, report differences from REV1 to REV2.  If
 ;;   REV1 is nil, use the working revision (as found in the
 ;;   repository) as the older revision; if REV2 is nil, use the
 ;;   revision been even possible, let alone sane.
 ;;
 ;;   INCOMPATIBLE CHANGE: In older versions of the API, vc-diff did
-;;   not take an async-mode flag as a first optional argument.  (This
+;;   not take an async-mode flag as a fourth optional argument.  (This
 ;;   change eliminated a particularly ugly global.)
 ;;
 ;; - INCOMPATIBLE CHANGE: The backend operation for non-distributed
@@ -1691,7 +1691,7 @@ Return t if the buffer had changes, nil otherwise."
                      (if async 'async 1) "diff" file
                      (append (vc-switches nil 'diff) '("/dev/null"))))))
         (setq files (nreverse filtered))))
-    (vc-call-backend (car vc-fileset) 'diff files async rev1 rev2 buffer)
+    (vc-call-backend (car vc-fileset) 'diff files rev1 rev2 buffer async)
     (set-buffer buffer)
     (diff-mode)
     (set (make-local-variable 'diff-vc-backend) (car vc-fileset))