comparison lisp/vc.el @ 83531:a387c138b28e

Merged from emacs@sv.gnu.org Patches applied: * emacs@sv.gnu.org/emacs--devo--0--patch-305 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-306 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-307 Update from CVS: lispref/display.texi (Forcing Redisplay): Fix typo. * emacs@sv.gnu.org/emacs--devo--0--patch-308 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-309 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-310 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-311 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-312 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-313 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-314 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-315 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-316 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-317 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-318 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-319 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-320 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-321 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-322 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-323 lisp/play/cookie1.el (cookie): Work properly when there's only one entry * emacs@sv.gnu.org/emacs--devo--0--patch-324 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-325 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-326 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-327 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-328 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-329 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-330 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-105 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-106 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-107 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-108 Merge from emacs--devo--0 * emacs@sv.gnu.org/gnus--rel--5.10--patch-109 Clean up merge mistakes * emacs@sv.gnu.org/gnus--rel--5.10--patch-110 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-571
author Karoly Lorentey <lorentey@elte.hu>
date Tue, 27 Jun 2006 15:06:36 +0000
parents 46b1096093f5 b0324f716b87
children b19aaf4ab0ee
comparison
equal deleted inserted replaced
83530:46b1096093f5 83531:a387c138b28e
564 (repeat :tag "Argument List" 564 (repeat :tag "Argument List"
565 :value ("") 565 :value ("")
566 string)) 566 string))
567 :group 'vc 567 :group 'vc
568 :version "21.1") 568 :version "21.1")
569
570 (defcustom vc-diff-knows-L nil
571 "*Indicates whether diff understands the -L option.
572 The value is either `yes', `no', or nil. If it is nil, VC tries
573 to use -L and sets this variable to remember whether it worked."
574 :type '(choice (const :tag "Work out" nil) (const yes) (const no))
575 :group 'vc)
569 576
570 (defcustom vc-allow-async-revert nil 577 (defcustom vc-allow-async-revert nil
571 "Specifies whether the diff during \\[vc-revert-buffer] may be asynchronous. 578 "Specifies whether the diff during \\[vc-revert-buffer] may be asynchronous.
572 Enabling this option means that you can confirm a revert operation even 579 Enabling this option means that you can confirm a revert operation even
573 if the local changes in the file have not been found and displayed yet." 580 if the local changes in the file have not been found and displayed yet."
1835 (file-rev2 (if (not rev2) 1842 (file-rev2 (if (not rev2)
1836 file 1843 file
1837 (vc-version-backup-file file rev2))) 1844 (vc-version-backup-file file rev2)))
1838 (coding-system-for-read (vc-coding-system-for-diff file))) 1845 (coding-system-for-read (vc-coding-system-for-diff file)))
1839 (if (and file-rev1 file-rev2) 1846 (if (and file-rev1 file-rev2)
1840 (apply 'vc-do-command "*vc-diff*" 1 "diff" nil 1847 (let ((status
1841 (append (vc-switches nil 'diff) 1848 (if (eq vc-diff-knows-L 'no)
1842 ;; Provide explicit labels like RCS or CVS would do 1849 (apply 'vc-do-command "*vc-diff*" 1 "diff"
1843 ;; so diff-mode refers to `file' rather than to 1850 (append (vc-switches nil 'diff)
1844 ;; `file-rev1' when trying to find/apply/undo hunks. 1851 (list (file-relative-name file-rev1)
1845 (list "-L" (vc-diff-label file file-rev1 rev1) 1852 (file-relative-name file-rev2))))
1846 "-L" (vc-diff-label file file-rev2 rev2) 1853 (apply 'vc-do-command "*vc-diff*" 2 "diff" nil
1847 (file-relative-name file-rev1) 1854 (append (vc-switches nil 'diff)
1848 (file-relative-name file-rev2)))) 1855 ;; Provide explicit labels like RCS or
1856 ;; CVS would do so diff-mode refers to
1857 ;; `file' rather than to `file-rev1'
1858 ;; when trying to find/apply/undo
1859 ;; hunks.
1860 (list "-L" (vc-diff-label file file-rev1 rev1)
1861 "-L" (vc-diff-label file file-rev2 rev2)
1862 (file-relative-name file-rev1)
1863 (file-relative-name file-rev2)))))))
1864 (if (eq status 2)
1865 (if (not vc-diff-knows-L)
1866 (setq vc-diff-knows-L 'no
1867 status (apply 'vc-do-command "*vc-diff*" 1 "diff"
1868 (append
1869 (vc-switches nil 'diff)
1870 (list (file-relative-name file-rev1)
1871 (file-relative-name file-rev2)))))
1872 (error "diff failed"))
1873 (if (not vc-diff-knows-L) (setq vc-diff-knows-L 'yes)))
1874 status)
1849 (vc-call diff file rev1 rev2)))) 1875 (vc-call diff file rev1 rev2))))
1850
1851 1876
1852 (defun vc-switches (backend op) 1877 (defun vc-switches (backend op)
1853 (let ((switches 1878 (let ((switches
1854 (or (if backend 1879 (or (if backend
1855 (let ((sym (vc-make-backend-sym 1880 (let ((sym (vc-make-backend-sym