41 |
;;;; config variables |
;;;; config variables |
42 |
;;;; |
;;;; |
43 |
|
|
44 |
(defcustom cvs-display-full-path t |
(defcustom cvs-display-full-name t |
45 |
"*Specifies how the filenames should look like in the listing. |
"*Specifies how the filenames should be displayed in the listing. |
46 |
If t, their full path name will be displayed, else only the filename." |
If non-nil, their full filename name will be displayed, else only the |
47 |
|
non-directory part." |
48 |
:group 'pcl-cvs |
:group 'pcl-cvs |
49 |
:type '(boolean)) |
:type '(boolean)) |
50 |
|
(define-obsolete-variable-alias 'cvs-display-full-path 'cvs-display-full-name) |
51 |
|
|
52 |
(defcustom cvs-allow-dir-commit nil |
(defcustom cvs-allow-dir-commit nil |
53 |
"*Allow `cvs-mode-commit' on directories. |
"*Allow `cvs-mode-commit' on directories. |
167 |
;; In addition to the above, the following values can be extracted: |
;; In addition to the above, the following values can be extracted: |
168 |
|
|
169 |
;; handled ;; t if this file doesn't require further action. |
;; handled ;; t if this file doesn't require further action. |
170 |
;; full-path ;; The complete relative filename. |
;; full-name ;; The complete relative filename. |
171 |
;; pp-name ;; The printed file name |
;; pp-name ;; The printed file name |
172 |
;; backup-file;; For MERGED and CONFLICT files after a \"cvs update\", |
;; backup-file;; For MERGED and CONFLICT files after a \"cvs update\", |
173 |
;; this is a full path to the backup file where the |
;; this is a full path to the backup file where the |
203 |
|
|
204 |
;; Fake selectors: |
;; Fake selectors: |
205 |
|
|
206 |
(defun cvs-fileinfo->full-path (fileinfo) |
(defun cvs-fileinfo->full-name (fileinfo) |
207 |
"Return the full path for the file that is described in FILEINFO." |
"Return the full path for the file that is described in FILEINFO." |
208 |
(let ((dir (cvs-fileinfo->dir fileinfo))) |
(let ((dir (cvs-fileinfo->dir fileinfo))) |
209 |
(if (eq (cvs-fileinfo->type fileinfo) 'DIRCHANGE) |
(if (eq (cvs-fileinfo->type fileinfo) 'DIRCHANGE) |
211 |
;; Here, I use `concat' rather than `expand-file-name' because I want |
;; Here, I use `concat' rather than `expand-file-name' because I want |
212 |
;; the resulting path to stay relative if `dir' is relative. |
;; the resulting path to stay relative if `dir' is relative. |
213 |
(concat dir (cvs-fileinfo->file fileinfo))))) |
(concat dir (cvs-fileinfo->file fileinfo))))) |
214 |
|
(define-obsolete-function-alias 'cvs-fileinfo->full-path 'cvs-fileinfo->full-name) |
215 |
|
|
216 |
(defun cvs-fileinfo->pp-name (fi) |
(defun cvs-fileinfo->pp-name (fi) |
217 |
"Return the filename of FI as it should be displayed." |
"Return the filename of FI as it should be displayed." |
218 |
(if cvs-display-full-path |
(if cvs-display-full-name |
219 |
(cvs-fileinfo->full-path fi) |
(cvs-fileinfo->full-name fi) |
220 |
(cvs-fileinfo->file fi))) |
(cvs-fileinfo->file fi))) |
221 |
|
|
222 |
(defun cvs-fileinfo->backup-file (fileinfo) |
(defun cvs-fileinfo->backup-file (fileinfo) |
228 |
(concat "\\`" (regexp-quote cvs-bakprefix) |
(concat "\\`" (regexp-quote cvs-bakprefix) |
229 |
(regexp-quote file) "\\(\\.[0-9]+\\.[0-9]+\\)+\\'"))) |
(regexp-quote file) "\\(\\.[0-9]+\\.[0-9]+\\)+\\'"))) |
230 |
bf) |
bf) |
231 |
(dolist (f files bf) |
(dolist (f files) |
232 |
(when (and (file-readable-p f) |
(when (and (file-readable-p f) |
233 |
(or (null bf) (file-newer-than-file-p f bf))) |
(or (null bf) (file-newer-than-file-p f bf))) |
234 |
(setq bf (concat dir f)))))) |
(setq bf f))) |
235 |
|
(concat dir bf))) |
236 |
|
|
237 |
;; (defun cvs-fileinfo->handled (fileinfo) |
;; (defun cvs-fileinfo->handled (fileinfo) |
238 |
;; "Tell if this requires further action" |
;; "Tell if this requires further action" |
331 |
(insert |
(insert |
332 |
(case type |
(case type |
333 |
(DIRCHANGE (concat "In directory " |
(DIRCHANGE (concat "In directory " |
334 |
(cvs-add-face (cvs-fileinfo->full-path fileinfo) |
(cvs-add-face (cvs-fileinfo->full-name fileinfo) |
335 |
'cvs-header-face t |
'cvs-header-face t |
336 |
'cvs-goal-column t) |
'cvs-goal-column t) |
337 |
":")) |
":")) |