Mercurial > emacs
comparison lisp/vc-cvs.el @ 35821:6b1ff979e045
(vc-cvs-diff-switches): New customization option.
(vc-cvs-diff): Use it via vc-diff-switches-list.
author | André Spiegel <spiegel@gnu.org> |
---|---|
date | Thu, 01 Feb 2001 15:10:16 +0000 |
parents | 395d188bb71d |
children | 7349d241e60b |
comparison
equal
deleted
inserted
replaced
35820:3cfa6e077b83 | 35821:6b1ff979e045 |
---|---|
3 ;; Copyright (C) 1995,98,99,2000 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1995,98,99,2000 Free Software Foundation, Inc. |
4 | 4 |
5 ;; Author: FSF (see vc.el for full credits) | 5 ;; Author: FSF (see vc.el for full credits) |
6 ;; Maintainer: Andre Spiegel <spiegel@gnu.org> | 6 ;; Maintainer: Andre Spiegel <spiegel@gnu.org> |
7 | 7 |
8 ;; $Id: vc-cvs.el,v 1.17 2001/01/25 21:02:37 sds Exp $ | 8 ;; $Id: vc-cvs.el,v 1.18 2001/01/29 19:12:40 sds Exp $ |
9 | 9 |
10 ;; This file is part of GNU Emacs. | 10 ;; This file is part of GNU Emacs. |
11 | 11 |
12 ;; GNU Emacs is free software; you can redistribute it and/or modify | 12 ;; GNU Emacs is free software; you can redistribute it and/or modify |
13 ;; it under the terms of the GNU General Public License as published by | 13 ;; it under the terms of the GNU General Public License as published by |
32 ;; keep the compiler happy | 32 ;; keep the compiler happy |
33 ;; note that there is another option: (require 'vc) | 33 ;; note that there is another option: (require 'vc) |
34 (defvar vc-register-switches) ; defined in "vc.el", used in `vc-cvs-register' | 34 (defvar vc-register-switches) ; defined in "vc.el", used in `vc-cvs-register' |
35 (defvar vc-checkin-switches) ; defined in "vc.el", used in `vc-cvs-checkin' | 35 (defvar vc-checkin-switches) ; defined in "vc.el", used in `vc-cvs-checkin' |
36 (defvar vc-checkout-switches) ; defined in "vc.el", used in `vc-cvs-checkout' | 36 (defvar vc-checkout-switches) ; defined in "vc.el", used in `vc-cvs-checkout' |
37 (autoload 'vc-diff-switches-list "vc") ; used in `vc-cvs-diff' | |
37 (autoload 'vc-do-command "vc") ; used all over the place | 38 (autoload 'vc-do-command "vc") ; used all over the place |
38 (autoload 'vc-trunk-p "vc") ; used in `vc-cvs-checkin' | 39 (autoload 'vc-trunk-p "vc") ; used in `vc-cvs-checkin' |
39 (autoload 'vc-resynch-buffer "vc")) ; used in `vc-cvs-retrieve-snapshot' | 40 (autoload 'vc-resynch-buffer "vc")) ; used in `vc-cvs-retrieve-snapshot' |
40 | 41 |
41 ;;; | 42 ;;; |
45 (defcustom vc-cvs-register-switches nil | 46 (defcustom vc-cvs-register-switches nil |
46 "*Extra switches for registering a file into CVS. | 47 "*Extra switches for registering a file into CVS. |
47 A string or list of strings passed to the checkin program by | 48 A string or list of strings passed to the checkin program by |
48 \\[vc-register]." | 49 \\[vc-register]." |
49 :type '(choice (const :tag "None" nil) | 50 :type '(choice (const :tag "None" nil) |
51 (string :tag "Argument String") | |
52 (repeat :tag "Argument List" | |
53 :value ("") | |
54 string)) | |
55 :version "21.1" | |
56 :group 'vc) | |
57 | |
58 (defcustom vc-cvs-diff-switches nil | |
59 "*A string or list of strings specifying extra switches for cvs diff under VC." | |
60 :type '(choice (const :tag "None" nil) | |
50 (string :tag "Argument String") | 61 (string :tag "Argument String") |
51 (repeat :tag "Argument List" | 62 (repeat :tag "Argument List" |
52 :value ("") | 63 :value ("") |
53 string)) | 64 string)) |
54 :version "21.1" | 65 :version "21.1" |
492 (goto-char start) | 503 (goto-char start) |
493 (recenter 0)))))) | 504 (recenter 0)))))) |
494 | 505 |
495 (defun vc-cvs-diff (file &optional oldvers newvers) | 506 (defun vc-cvs-diff (file &optional oldvers newvers) |
496 "Get a difference report using CVS between two versions of FILE." | 507 "Get a difference report using CVS between two versions of FILE." |
497 (let (options status | 508 (let (options status (diff-switches-list (vc-diff-switches-list cvs))) |
498 (diff-switches-list (if (listp diff-switches) | |
499 diff-switches | |
500 (list diff-switches)))) | |
501 (if (string= (vc-workfile-version file) "0") | 509 (if (string= (vc-workfile-version file) "0") |
502 ;; This file is added but not yet committed; there is no master file. | 510 ;; This file is added but not yet committed; there is no master file. |
503 (if (or oldvers newvers) | 511 (if (or oldvers newvers) |
504 (error "No revisions of %s exist" file) | 512 (error "No revisions of %s exist" file) |
505 ;; we regard this as "changed". | 513 ;; we regard this as "changed". |