comparison lisp/packages/vc.el @ 187:b405438285a2 r20-3b20

Import from CVS: tag r20-3b20
author cvs
date Mon, 13 Aug 2007 09:56:28 +0200
parents 6075d714658b
children
comparison
equal deleted inserted replaced
186:24ac94803b48 187:b405438285a2
121 "*A string or list of strings specifying extra switches passed 121 "*A string or list of strings specifying extra switches passed
122 to the checkout program by \\[vc-checkout].") 122 to the checkout program by \\[vc-checkout].")
123 (defvar vc-directory-exclusion-list '("SCCS" "RCS" "CVS") 123 (defvar vc-directory-exclusion-list '("SCCS" "RCS" "CVS")
124 "*A list of directory names ignored by functions that recursively 124 "*A list of directory names ignored by functions that recursively
125 walk file trees.") 125 walk file trees.")
126 (defvar vc-default-init-version nil
127 "*A string giving the default version number for the function `vc-register'.
128 If `nil' (default), the choice of initial version is left to the
129 version control program. Can be overridden by giving a prefix
130 argument to `vc-register'.")
126 131
127 (defconst vc-maximum-comment-ring-size 32 132 (defconst vc-maximum-comment-ring-size 32
128 "Maximum number of saved comments in the comment ring.") 133 "Maximum number of saved comments in the comment ring.")
129 134
130 ;;; This is duplicated in diff.el. 135 ;;; This is duplicated in diff.el.
817 (vc-checkout (or file (buffer-file-name)) t rev) 822 (vc-checkout (or file (buffer-file-name)) t rev)
818 ) 823 )
819 824
820 ;;;###autoload 825 ;;;###autoload
821 (defun vc-register (&optional override comment) 826 (defun vc-register (&optional override comment)
822 "Register the current file into your version-control system." 827 "Register the current file into your version-control system.
828 The default initial version number, taken to be `vc-default-init-version',
829 can be overridden by giving a prefix arg."
823 (interactive "P") 830 (interactive "P")
824 (or buffer-file-name 831 (or buffer-file-name
825 (error "No visited file")) 832 (error "No visited file"))
826 (let ((master (vc-name buffer-file-name))) 833 (let ((master (vc-name buffer-file-name)))
827 (and master (file-exists-p master) 834 (and master (file-exists-p master)
840 ;; inhibit backup for this buffer 847 ;; inhibit backup for this buffer
841 (make-local-variable 'backup-inhibited) 848 (make-local-variable 'backup-inhibited)
842 (setq backup-inhibited t))) 849 (setq backup-inhibited t)))
843 (vc-admin 850 (vc-admin
844 buffer-file-name 851 buffer-file-name
845 (and override 852 (or (and override
846 (read-string 853 (read-string
847 (format "Initial version level for %s: " buffer-file-name)))) 854 (format "Initial version level for %s: "
848 ) 855 buffer-file-name)))
856 vc-default-init-version)
857 comment))
849 858
850 (defun vc-resynch-window (file &optional keep noquery) 859 (defun vc-resynch-window (file &optional keep noquery)
851 ;; If the given file is in the current buffer, 860 ;; If the given file is in the current buffer,
852 ;; either revert on it so we see expanded keywords, 861 ;; either revert on it so we see expanded keywords,
853 ;; or unvisit it (depending on vc-keep-workfiles) 862 ;; or unvisit it (depending on vc-keep-workfiles)