aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Gutov2014-12-14 12:49:08 +0200
committerDmitry Gutov2014-12-14 12:49:08 +0200
commit01b97f9df2d94e1e1c31517e084bf8d76174e1d4 (patch)
tree5a2c04ab23b497e86b452d2ee5f903196bb9940f
parentf8f73570a89975fabb587b490b3ccb6a40e8aee1 (diff)
downloademacs-01b97f9df2d94e1e1c31517e084bf8d76174e1d4.tar.gz
emacs-01b97f9df2d94e1e1c31517e084bf8d76174e1d4.zip
Move VC diff ASYNC argument to the fifth position
* 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.
-rw-r--r--lisp/ChangeLog21
-rw-r--r--lisp/obsolete/vc-arch.el2
-rw-r--r--lisp/vc/vc-bzr.el2
-rw-r--r--lisp/vc/vc-cvs.el2
-rw-r--r--lisp/vc/vc-dav.el2
-rw-r--r--lisp/vc/vc-git.el4
-rw-r--r--lisp/vc/vc-hg.el2
-rw-r--r--lisp/vc/vc-mtn.el2
-rw-r--r--lisp/vc/vc-rcs.el2
-rw-r--r--lisp/vc/vc-sccs.el2
-rw-r--r--lisp/vc/vc-src.el2
-rw-r--r--lisp/vc/vc-svn.el2
-rw-r--r--lisp/vc/vc.el8
13 files changed, 37 insertions, 16 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 37f637b503a..cb43a9b732f 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,24 @@
12014-12-14 Dmitry Gutov <dgutov@yandex.ru>
2
3 Move ASYNC argument to the `diff' VC command to the fifth
4 position, for better compatibility with existing third-party code,
5 and document it.
6
7 * vc/vc.el (vc-diff-internal): Pass `async' argument to the
8 backend `diff' command in the last position.
9
10 * vc/vc-svn.el (vc-svn-diff):
11 * vc/vc-src.el (vc-src-diff):
12 * vc/vc-sccs.el (vc-sccs-diff):
13 * vc/vc-rcs.el (vc-rcs-diff):
14 * vc/vc-mtn.el (vc-mtn-diff):
15 * vc/vc-hg.el (vc-hg-diff):
16 * vc/vc-git.el (vc-git-diff):
17 * vc/vc-dav.el (vc-dav-diff):
18 * vc/vc-cvs.el (vc-cvs-diff):
19 * vc/vc-bzr.el (vc-bzr-diff):
20 * obsolete/vc-arch.el (vc-arch-diff): Move ASYNC argument to the end.
21
12014-12-13 Andreas Schwab <schwab@linux-m68k.org> 222014-12-13 Andreas Schwab <schwab@linux-m68k.org>
2 23
3 * net/shr.el (shr-next-link): Don't error out at eob. 24 * net/shr.el (shr-next-link): Don't error out at eob.
diff --git a/lisp/obsolete/vc-arch.el b/lisp/obsolete/vc-arch.el
index d1344f2b1cc..c1ac505270c 100644
--- a/lisp/obsolete/vc-arch.el
+++ b/lisp/obsolete/vc-arch.el
@@ -448,7 +448,7 @@ CALLBACK expects (ENTRIES &optional MORE-TO-COME); see
448 (vc-arch-command nil 0 files "commit" "-s" summary "-L" comment "--" 448 (vc-arch-command nil 0 files "commit" "-s" summary "-L" comment "--"
449 (vc-switches 'Arch 'checkin)))) 449 (vc-switches 'Arch 'checkin))))
450 450
451(defun vc-arch-diff (files &optional async oldvers newvers buffer) 451(defun vc-arch-diff (files &optional oldvers newvers buffer async)
452 "Get a difference report using Arch between two versions of FILES." 452 "Get a difference report using Arch between two versions of FILES."
453 ;; FIXME: This implementation only works for singleton filesets. To make 453 ;; FIXME: This implementation only works for singleton filesets. To make
454 ;; it work for more cases, we have to either call `file-diffs' manually on 454 ;; it work for more cases, we have to either call `file-diffs' manually on
diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el
index 1963f4e39ac..de101649802 100644
--- a/lisp/vc/vc-bzr.el
+++ b/lisp/vc/vc-bzr.el
@@ -767,7 +767,7 @@ If LIMIT is non-nil, show no more than this many entries."
767 767
768(autoload 'vc-switches "vc") 768(autoload 'vc-switches "vc")
769 769
770(defun vc-bzr-diff (files &optional async rev1 rev2 buffer) 770(defun vc-bzr-diff (files &optional rev1 rev2 buffer async)
771 "VC bzr backend for diff." 771 "VC bzr backend for diff."
772 (let* ((switches (vc-switches 'bzr 'diff)) 772 (let* ((switches (vc-switches 'bzr 'diff))
773 (args 773 (args
diff --git a/lisp/vc/vc-cvs.el b/lisp/vc/vc-cvs.el
index a5b50c16e09..c1d32cea605 100644
--- a/lisp/vc/vc-cvs.el
+++ b/lisp/vc/vc-cvs.el
@@ -569,7 +569,7 @@ Remaining arguments are ignored."
569(autoload 'vc-version-backup-file "vc") 569(autoload 'vc-version-backup-file "vc")
570(declare-function vc-coding-system-for-diff "vc" (file)) 570(declare-function vc-coding-system-for-diff "vc" (file))
571 571
572(defun vc-cvs-diff (files &optional async oldvers newvers buffer) 572(defun vc-cvs-diff (files &optional oldvers newvers buffer async)
573 "Get a difference report using CVS between two revisions of FILE." 573 "Get a difference report using CVS between two revisions of FILE."
574 (let* (process-file-side-effects 574 (let* (process-file-side-effects
575 (async (and async (vc-cvs-stay-local-p files))) 575 (async (and async (vc-cvs-stay-local-p files)))
diff --git a/lisp/vc/vc-dav.el b/lisp/vc/vc-dav.el
index 4c3fe6abff7..f107764f404 100644
--- a/lisp/vc/vc-dav.el
+++ b/lisp/vc/vc-dav.el
@@ -117,7 +117,7 @@ only needs to update the status of URL within the backend.
117 "Insert the revision log of URL into the *vc* buffer." 117 "Insert the revision log of URL into the *vc* buffer."
118 ) 118 )
119 119
120(defun vc-dav-diff (url &optional async rev1 rev2) 120(defun vc-dav-diff (url &optional rev1 rev2 buffer async)
121 "Insert the diff for URL into the *vc-diff* buffer. 121 "Insert the diff for URL into the *vc-diff* buffer.
122If REV1 and REV2 are non-nil report differences from REV1 to REV2. 122If REV1 and REV2 are non-nil report differences from REV1 to REV2.
123If REV1 is nil, use the current workfile version as the older version. 123If REV1 is nil, use the current workfile version as the older version.
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index c41dde1b3db..65f683c7808 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -78,7 +78,7 @@
78;; - show-log-entry (revision) OK 78;; - show-log-entry (revision) OK
79;; - comment-history (file) ?? 79;; - comment-history (file) ??
80;; - update-changelog (files) COULD BE SUPPORTED 80;; - update-changelog (files) COULD BE SUPPORTED
81;; * diff (file &optional rev1 rev2 buffer) OK 81;; * diff (file &optional rev1 rev2 buffer async) OK
82;; - revision-completion-table (files) OK 82;; - revision-completion-table (files) OK
83;; - annotate-command (file buf &optional rev) OK 83;; - annotate-command (file buf &optional rev) OK
84;; - annotate-time () OK 84;; - annotate-time () OK
@@ -977,7 +977,7 @@ or BRANCH^ (where \"^\" can be repeated)."
977 977
978(autoload 'vc-switches "vc") 978(autoload 'vc-switches "vc")
979 979
980(defun vc-git-diff (files &optional async rev1 rev2 buffer) 980(defun vc-git-diff (files &optional rev1 rev2 buffer async)
981 "Get a difference report using Git between two revisions of FILES." 981 "Get a difference report using Git between two revisions of FILES."
982 (let (process-file-side-effects) 982 (let (process-file-side-effects)
983 (if vc-git-diff-switches 983 (if vc-git-diff-switches
diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el
index 0d9f9f182fa..e65009db2ef 100644
--- a/lisp/vc/vc-hg.el
+++ b/lisp/vc/vc-hg.el
@@ -313,7 +313,7 @@ If LIMIT is non-nil, show no more than this many entries."
313 313
314(autoload 'vc-switches "vc") 314(autoload 'vc-switches "vc")
315 315
316(defun vc-hg-diff (files &optional async oldvers newvers buffer) 316(defun vc-hg-diff (files &optional oldvers newvers buffer async)
317 "Get a difference report using hg between two revisions of FILES." 317 "Get a difference report using hg between two revisions of FILES."
318 (let* ((firstfile (car files)) 318 (let* ((firstfile (car files))
319 (working (and firstfile (vc-working-revision firstfile)))) 319 (working (and firstfile (vc-working-revision firstfile))))
diff --git a/lisp/vc/vc-mtn.el b/lisp/vc/vc-mtn.el
index 7d2f7349897..d1736a42a3d 100644
--- a/lisp/vc/vc-mtn.el
+++ b/lisp/vc/vc-mtn.el
@@ -236,7 +236,7 @@ If LIMIT is non-nil, show no more than this many entries."
236 236
237(autoload 'vc-switches "vc") 237(autoload 'vc-switches "vc")
238 238
239(defun vc-mtn-diff (files &optional async rev1 rev2 buffer) 239(defun vc-mtn-diff (files &optional rev1 rev2 buffer async)
240 "Get a difference report using monotone between two revisions of FILES." 240 "Get a difference report using monotone between two revisions of FILES."
241 (apply 'vc-mtn-command (or buffer "*vc-diff*") 241 (apply 'vc-mtn-command (or buffer "*vc-diff*")
242 (if async 'async 1) 242 (if async 'async 1)
diff --git a/lisp/vc/vc-rcs.el b/lisp/vc/vc-rcs.el
index 8866bdbad96..cb3d36f13fb 100644
--- a/lisp/vc/vc-rcs.el
+++ b/lisp/vc/vc-rcs.el
@@ -535,7 +535,7 @@ files beneath it."
535 (vc-rcs-print-log-cleanup)) 535 (vc-rcs-print-log-cleanup))
536 (when limit 'limit-unsupported)) 536 (when limit 'limit-unsupported))
537 537
538(defun vc-rcs-diff (files &optional async oldvers newvers buffer) 538(defun vc-rcs-diff (files &optional oldvers newvers buffer async)
539 "Get a difference report using RCS between two sets of files." 539 "Get a difference report using RCS between two sets of files."
540 (apply #'vc-do-command (or buffer "*vc-diff*") 540 (apply #'vc-do-command (or buffer "*vc-diff*")
541 (if async 'async 1) 541 (if async 'async 1)
diff --git a/lisp/vc/vc-sccs.el b/lisp/vc/vc-sccs.el
index 63628647fd4..cfd3cccf9b1 100644
--- a/lisp/vc/vc-sccs.el
+++ b/lisp/vc/vc-sccs.el
@@ -316,7 +316,7 @@ Remaining arguments are ignored."
316(defvar w32-quote-process-args) 316(defvar w32-quote-process-args)
317 317
318;; FIXME use sccsdiff if present? 318;; FIXME use sccsdiff if present?
319(defun vc-sccs-diff (files &optional _async oldvers newvers buffer) 319(defun vc-sccs-diff (files &optional oldvers newvers buffer _async)
320 "Get a difference report using SCCS between two filesets." 320 "Get a difference report using SCCS between two filesets."
321 (setq files (vc-expand-dirs files 'SCCS)) 321 (setq files (vc-expand-dirs files 'SCCS))
322 (setq oldvers (vc-sccs-lookup-triple (car files) oldvers)) 322 (setq oldvers (vc-sccs-lookup-triple (car files) oldvers))
diff --git a/lisp/vc/vc-src.el b/lisp/vc/vc-src.el
index 539437d185c..50c0a7ef1b0 100644
--- a/lisp/vc/vc-src.el
+++ b/lisp/vc/vc-src.el
@@ -288,7 +288,7 @@ If LIMIT is non-nil, show no more than this many entries."
288 (when limit (list "-l" (format "%s" limit))) 288 (when limit (list "-l" (format "%s" limit)))
289 vc-src-log-switches))))) 289 vc-src-log-switches)))))
290 290
291(defun vc-src-diff (files &optional _async oldvers newvers buffer) 291(defun vc-src-diff (files &optional oldvers newvers buffer _async)
292 "Get a difference report using src between two revisions of FILES." 292 "Get a difference report using src between two revisions of FILES."
293 (let* ((firstfile (car files)) 293 (let* ((firstfile (car files))
294 (working (and firstfile (vc-working-revision firstfile)))) 294 (working (and firstfile (vc-working-revision firstfile))))
diff --git a/lisp/vc/vc-svn.el b/lisp/vc/vc-svn.el
index 5db26767fda..eedccd81d4c 100644
--- a/lisp/vc/vc-svn.el
+++ b/lisp/vc/vc-svn.el
@@ -548,7 +548,7 @@ If LIMIT is non-nil, show no more than this many entries."
548 (if start-revision (format "-r%s" start-revision) "-rHEAD:0")) 548 (if start-revision (format "-r%s" start-revision) "-rHEAD:0"))
549 (when limit (list "--limit" (format "%s" limit))))))))) 549 (when limit (list "--limit" (format "%s" limit)))))))))
550 550
551(defun vc-svn-diff (files &optional async oldvers newvers buffer) 551(defun vc-svn-diff (files &optional oldvers newvers buffer async)
552 "Get a difference report using SVN between two revisions of fileset FILES." 552 "Get a difference report using SVN between two revisions of fileset FILES."
553 (and oldvers 553 (and oldvers
554 (not newvers) 554 (not newvers)
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index b8be3ff7df2..954b3cfeb02 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -362,10 +362,10 @@
362;; default implementation runs rcs2log, which handles RCS- and 362;; default implementation runs rcs2log, which handles RCS- and
363;; CVS-style logs. 363;; CVS-style logs.
364;; 364;;
365;; * diff (files &optional async rev1 rev2 buffer) 365;; * diff (files &optional rev1 rev2 buffer async)
366;; 366;;
367;; Insert the diff for FILE into BUFFER, or the *vc-diff* buffer if 367;; Insert the diff for FILE into BUFFER, or the *vc-diff* buffer if
368;; BUFFER is nil. If ASYNC is non-nil, run asynchronously.If REV1 368;; BUFFER is nil. If ASYNC is non-nil, run asynchronously. If REV1
369;; and REV2 are non-nil, report differences from REV1 to REV2. If 369;; and REV2 are non-nil, report differences from REV1 to REV2. If
370;; REV1 is nil, use the working revision (as found in the 370;; REV1 is nil, use the working revision (as found in the
371;; repository) as the older revision; if REV2 is nil, use the 371;; repository) as the older revision; if REV2 is nil, use the
@@ -552,7 +552,7 @@
552;; revision been even possible, let alone sane. 552;; revision been even possible, let alone sane.
553;; 553;;
554;; INCOMPATIBLE CHANGE: In older versions of the API, vc-diff did 554;; INCOMPATIBLE CHANGE: In older versions of the API, vc-diff did
555;; not take an async-mode flag as a first optional argument. (This 555;; not take an async-mode flag as a fourth optional argument. (This
556;; change eliminated a particularly ugly global.) 556;; change eliminated a particularly ugly global.)
557;; 557;;
558;; - INCOMPATIBLE CHANGE: The backend operation for non-distributed 558;; - INCOMPATIBLE CHANGE: The backend operation for non-distributed
@@ -1691,7 +1691,7 @@ Return t if the buffer had changes, nil otherwise."
1691 (if async 'async 1) "diff" file 1691 (if async 'async 1) "diff" file
1692 (append (vc-switches nil 'diff) '("/dev/null")))))) 1692 (append (vc-switches nil 'diff) '("/dev/null"))))))
1693 (setq files (nreverse filtered)))) 1693 (setq files (nreverse filtered))))
1694 (vc-call-backend (car vc-fileset) 'diff files async rev1 rev2 buffer) 1694 (vc-call-backend (car vc-fileset) 'diff files rev1 rev2 buffer async)
1695 (set-buffer buffer) 1695 (set-buffer buffer)
1696 (diff-mode) 1696 (diff-mode)
1697 (set (make-local-variable 'diff-vc-backend) (car vc-fileset)) 1697 (set (make-local-variable 'diff-vc-backend) (car vc-fileset))