171 |
;; The implementation should pass the value of vc-register-switches |
;; The implementation should pass the value of vc-register-switches |
172 |
;; to the backend command. |
;; to the backend command. |
173 |
;; |
;; |
174 |
|
;; - init-version (file) |
175 |
|
;; |
176 |
|
;; The initial version to use when registering FILE if one is not |
177 |
|
;; specified by the user. If not provided, the variable |
178 |
|
;; vc-default-init-version is used instead. |
179 |
|
;; |
180 |
;; - responsible-p (file) |
;; - responsible-p (file) |
181 |
;; |
;; |
182 |
;; Return non-nil if this backend considers itself "responsible" for |
;; Return non-nil if this backend considers itself "responsible" for |
435 |
|
|
436 |
(defcustom vc-default-init-version "1.1" |
(defcustom vc-default-init-version "1.1" |
437 |
"*A string used as the default version number when a new file is registered. |
"*A string used as the default version number when a new file is registered. |
438 |
This can be overridden by giving a prefix argument to \\[vc-register]." |
This can be overridden by giving a prefix argument to \\[vc-register]. This |
439 |
|
can also be overridden by a particular VC backend." |
440 |
:type 'string |
:type 'string |
441 |
:group 'vc |
:group 'vc |
442 |
:version "20.3") |
:version "20.3") |
1349 |
(if set-version |
(if set-version |
1350 |
(read-string (format "Initial version level for %s: " |
(read-string (format "Initial version level for %s: " |
1351 |
(buffer-name))) |
(buffer-name))) |
1352 |
;; TODO: Use backend-specific init version. |
(let ((backend (vc-responsible-backend buffer-file-name))) |
1353 |
vc-default-init-version) |
(if (vc-find-backend-function backend 'init-version) |
1354 |
|
(vc-call-backend backend 'init-version) |
1355 |
|
vc-default-init-version))) |
1356 |
(or comment (not vc-initial-comment)) |
(or comment (not vc-initial-comment)) |
1357 |
nil |
nil |
1358 |
"Enter initial comment." |
"Enter initial comment." |
1876 |
`(append |
`(append |
1877 |
(if (listp diff-switches) diff-switches (list diff-switches)) |
(if (listp diff-switches) diff-switches (list diff-switches)) |
1878 |
(if (listp vc-diff-switches) vc-diff-switches (list vc-diff-switches)) |
(if (listp vc-diff-switches) vc-diff-switches (list vc-diff-switches)) |
1879 |
(let ((backend-switches |
(let* ((backend-switches-symbol |
1880 |
(eval (intern (concat "vc-" (symbol-name ',backend) |
(intern (concat "vc-" (symbol-name ,backend) |
1881 |
"-diff-switches"))))) |
"-diff-switches"))) |
1882 |
|
(backend-switches |
1883 |
|
(if (boundp backend-switches-symbol) |
1884 |
|
(eval backend-switches-symbol) |
1885 |
|
nil))) |
1886 |
(if (listp backend-switches) backend-switches (list backend-switches))))) |
(if (listp backend-switches) backend-switches (list backend-switches))))) |
1887 |
|
|
1888 |
(defun vc-default-diff-tree (backend dir rel1 rel2) |
(defun vc-default-diff-tree (backend dir rel1 rel2) |