diff options
| author | Richard M. Stallman | 1996-09-01 18:33:12 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1996-09-01 18:33:12 +0000 |
| commit | a633d9afc2ba1e7a67b9403d7e1211039dc8789d (patch) | |
| tree | 3d3c1fd6ff3a1cff1ebdc9fbfcb5d43dfa71ae28 | |
| parent | c43aa15d17d2a2d01fca9b558e57e471862427b3 (diff) | |
| download | emacs-a633d9afc2ba1e7a67b9403d7e1211039dc8789d.tar.gz emacs-a633d9afc2ba1e7a67b9403d7e1211039dc8789d.zip | |
(vc-register-switches): New variable.
(vc-backend-admin): Use vc-register-switches.
| -rw-r--r-- | lisp/vc.el | 49 |
1 files changed, 29 insertions, 20 deletions
diff --git a/lisp/vc.el b/lisp/vc.el index cd496400c6e..c1d946a3ac7 100644 --- a/lisp/vc.el +++ b/lisp/vc.el | |||
| @@ -104,6 +104,9 @@ If FORM3 is `RCS', use FORM2 for CVS as well as RCS. | |||
| 104 | "*If non-nil, prompt for initial comment when a file is registered.") | 104 | "*If non-nil, prompt for initial comment when a file is registered.") |
| 105 | (defvar vc-command-messages nil | 105 | (defvar vc-command-messages nil |
| 106 | "*If non-nil, display run messages from back-end commands.") | 106 | "*If non-nil, display run messages from back-end commands.") |
| 107 | (defvar vc-register-switches nil | ||
| 108 | "*A string or list of strings specifying extra switches passed | ||
| 109 | to the register program by \\[vc-register].") | ||
| 107 | (defvar vc-checkin-switches nil | 110 | (defvar vc-checkin-switches nil |
| 108 | "*A string or list of strings specifying extra switches passed | 111 | "*A string or list of strings specifying extra switches passed |
| 109 | to the checkin program by \\[vc-checkin].") | 112 | to the checkin program by \\[vc-checkin].") |
| @@ -1814,7 +1817,11 @@ default directory." | |||
| 1814 | (or vc-default-back-end | 1817 | (or vc-default-back-end |
| 1815 | (setq vc-default-back-end (if (vc-find-binary "rcs") 'RCS 'SCCS))) | 1818 | (setq vc-default-back-end (if (vc-find-binary "rcs") 'RCS 'SCCS))) |
| 1816 | (message "Registering %s..." file) | 1819 | (message "Registering %s..." file) |
| 1817 | (let ((backend | 1820 | (let ((switches |
| 1821 | (if (stringp vc-register-switches) | ||
| 1822 | (list vc-register-switches) | ||
| 1823 | vc-register-switches)) | ||
| 1824 | (backend | ||
| 1818 | (cond | 1825 | (cond |
| 1819 | ((file-exists-p (vc-backend-subdirectory-name)) vc-default-back-end) | 1826 | ((file-exists-p (vc-backend-subdirectory-name)) vc-default-back-end) |
| 1820 | ((file-exists-p "RCS") 'RCS) | 1827 | ((file-exists-p "RCS") 'RCS) |
| @@ -1822,30 +1829,32 @@ default directory." | |||
| 1822 | ((file-exists-p "CVS") 'CVS) | 1829 | ((file-exists-p "CVS") 'CVS) |
| 1823 | (t vc-default-back-end)))) | 1830 | (t vc-default-back-end)))) |
| 1824 | (cond ((eq backend 'SCCS) | 1831 | (cond ((eq backend 'SCCS) |
| 1825 | (vc-do-command nil 0 "admin" file 'MASTER ;; SCCS | 1832 | (apply 'vc-do-command nil 0 "admin" file 'MASTER ;; SCCS |
| 1826 | (and rev (concat "-r" rev)) | 1833 | (and rev (concat "-r" rev)) |
| 1827 | "-fb" | 1834 | "-fb" |
| 1828 | (concat "-i" file) | 1835 | (concat "-i" file) |
| 1829 | (and comment (concat "-y" comment)) | 1836 | (and comment (concat "-y" comment)) |
| 1830 | (format | 1837 | (format |
| 1831 | (car (rassq 'SCCS vc-master-templates)) | 1838 | (car (rassq 'SCCS vc-master-templates)) |
| 1832 | (or (file-name-directory file) "") | 1839 | (or (file-name-directory file) "") |
| 1833 | (file-name-nondirectory file))) | 1840 | (file-name-nondirectory file)) |
| 1841 | switches) | ||
| 1834 | (delete-file file) | 1842 | (delete-file file) |
| 1835 | (if vc-keep-workfiles | 1843 | (if vc-keep-workfiles |
| 1836 | (vc-do-command nil 0 "get" file 'MASTER))) | 1844 | (vc-do-command nil 0 "get" file 'MASTER))) |
| 1837 | ((eq backend 'RCS) | 1845 | ((eq backend 'RCS) |
| 1838 | (vc-do-command nil 0 "ci" file 'MASTER ;; RCS | 1846 | (apply 'vc-do-command nil 0 "ci" file 'WORKFILE ;; RCS |
| 1839 | ;; if available, use the secure registering option | 1847 | ;; if available, use the secure registering option |
| 1840 | (and (vc-backend-release-p 'RCS "5.6.4") "-i") | 1848 | (and (vc-backend-release-p 'RCS "5.6.4") "-i") |
| 1841 | (concat (if vc-keep-workfiles "-u" "-r") rev) | 1849 | (concat (if vc-keep-workfiles "-u" "-r") rev) |
| 1842 | (and comment (concat "-t-" comment)) | 1850 | (and comment (concat "-t-" comment)) |
| 1843 | file)) | 1851 | switches)) |
| 1844 | ((eq backend 'CVS) | 1852 | ((eq backend 'CVS) |
| 1845 | (vc-do-command nil 0 "cvs" file 'WORKFILE ;; CVS | 1853 | (apply 'vc-do-command nil 0 "cvs" file 'WORKFILE ;; CVS |
| 1846 | "add" | 1854 | "add" |
| 1847 | (and comment (string-match "[^\t\n ]" comment) | 1855 | (and comment (string-match "[^\t\n ]" comment) |
| 1848 | (concat "-m" comment))) | 1856 | (concat "-m" comment)) |
| 1857 | switches) | ||
| 1849 | ))) | 1858 | ))) |
| 1850 | (message "Registering %s...done" file) | 1859 | (message "Registering %s...done" file) |
| 1851 | ) | 1860 | ) |