comparison lisp/vc-svn.el @ 56777:332e641fe2b1

(vc-svn-diff): Treat options from vc-svn-diff-switches and vc-diff-switches differently.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Mon, 23 Aug 2004 18:23:52 +0000
parents d8a2b8a11274
children 43248e1430b6 d8411455de48
comparison
equal deleted inserted replaced
56776:c36d40df2cc6 56777:332e641fe2b1
1 ;;; vc-svn.el --- non-resident support for Subversion version-control 1 ;;; vc-svn.el --- non-resident support for Subversion version-control
2 2
3 ;; Copyright (C) 1995,98,99,2000,2001,02,2003 Free Software Foundation, Inc. 3 ;; Copyright (C) 1995, 1998, 1999, 2000, 2001, 2002, 2003, 2004
4 ;; Free Software Foundation, Inc.
4 5
5 ;; Author: FSF (see vc.el for full credits) 6 ;; Author: FSF (see vc.el for full credits)
6 ;; Maintainer: Stefan Monnier <monnier@gnu.org> 7 ;; Maintainer: Stefan Monnier <monnier@gnu.org>
7 8
8 ;; This file is part of GNU Emacs. 9 ;; This file is part of GNU Emacs.
361 (apply 'vc-do-command buffer 362 (apply 'vc-do-command buffer
362 1 "diff" file 363 1 "diff" file
363 (append (vc-switches nil 'diff) '("/dev/null"))) 364 (append (vc-switches nil 'diff) '("/dev/null")))
364 ;; Even if it's empty, it's locally modified. 365 ;; Even if it's empty, it's locally modified.
365 1) 366 1)
366 (let* ((switches (vc-switches 'SVN 'diff)) 367 (let* ((switches
368 (if vc-svn-diff-switches
369 (vc-switches 'SVN 'diff)
370 (list "-x" (mapconcat 'identity (vc-switches nil 'diff) " "))))
367 (async (and (vc-stay-local-p file) 371 (async (and (vc-stay-local-p file)
368 (or oldvers newvers) ; Svn diffs those locally. 372 (or oldvers newvers) ; Svn diffs those locally.
369 (fboundp 'start-process)))) 373 (fboundp 'start-process))))
370 (apply 'vc-svn-command buffer 374 (apply 'vc-svn-command buffer
371 (if async 'async 0) 375 (if async 'async 0)
372 file "diff" 376 file "diff"
373 (append 377 (append
374 (when switches 378 switches
375 (list "-x" (mapconcat 'identity switches " ")))
376 (when oldvers 379 (when oldvers
377 (list "-r" (if newvers (concat oldvers ":" newvers) 380 (list "-r" (if newvers (concat oldvers ":" newvers)
378 oldvers))))) 381 oldvers)))))
379 (if async 1 ; async diff => pessimistic assumption 382 (if async 1 ; async diff => pessimistic assumption
380 ;; For some reason `svn diff' does not return a useful 383 ;; For some reason `svn diff' does not return a useful
502 (and (string-match "^[0-9]" tag) 505 (and (string-match "^[0-9]" tag)
503 (not (string-match "[^0-9]" tag)))) 506 (not (string-match "[^0-9]" tag))))
504 507
505 (provide 'vc-svn) 508 (provide 'vc-svn)
506 509
507 ;;; arch-tag: 02f10c68-2b4d-453a-90fc-1eee6cfb268d 510 ;; arch-tag: 02f10c68-2b4d-453a-90fc-1eee6cfb268d
508 ;;; vc-svn.el ends here 511 ;;; vc-svn.el ends here