Mercurial > emacs
comparison lisp/vc-git.el @ 94107:5d2bbe3fd618
Rename vc-status to vc-dir.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Wed, 16 Apr 2008 03:00:53 +0000 |
parents | 6c138603231c |
children | 55b13d307a7a |
comparison
equal
deleted
inserted
replaced
94106:9294e3bd7d46 | 94107:5d2bbe3fd618 |
---|---|
284 " " | 284 " " |
285 (if (eq 0 (logand ?\111 old-perm)) "+x" "-x")) | 285 (if (eq 0 (logand ?\111 old-perm)) "+x" "-x")) |
286 'face 'font-lock-type-face)) | 286 'face 'font-lock-type-face)) |
287 | 287 |
288 (defun vc-git-status-printer (info) | 288 (defun vc-git-status-printer (info) |
289 "Pretty-printer for the vc-status-fileinfo structure." | 289 "Pretty-printer for the vc-dir-fileinfo structure." |
290 (let* ((state (vc-status-fileinfo->state info)) | 290 (let* ((state (vc-dir-fileinfo->state info)) |
291 (extra (vc-status-fileinfo->extra info)) | 291 (extra (vc-dir-fileinfo->extra info)) |
292 (old-perm (when extra (vc-git-extra-fileinfo->old-perm extra))) | 292 (old-perm (when extra (vc-git-extra-fileinfo->old-perm extra))) |
293 (new-perm (when extra (vc-git-extra-fileinfo->new-perm extra)))) | 293 (new-perm (when extra (vc-git-extra-fileinfo->new-perm extra)))) |
294 (insert | 294 (insert |
295 " " | 295 " " |
296 (propertize (format "%c" (if (vc-status-fileinfo->marked info) ?* ? )) | 296 (propertize (format "%c" (if (vc-dir-fileinfo->marked info) ?* ? )) |
297 'face 'font-lock-type-face) | 297 'face 'font-lock-type-face) |
298 " " | 298 " " |
299 (propertize | 299 (propertize |
300 (format "%-12s" state) | 300 (format "%-12s" state) |
301 'face (cond ((eq state 'up-to-date) 'font-lock-builtin-face) | 301 'face (cond ((eq state 'up-to-date) 'font-lock-builtin-face) |
302 ((eq state 'missing) 'font-lock-warning-face) | 302 ((eq state 'missing) 'font-lock-warning-face) |
303 (t 'font-lock-variable-name-face)) | 303 (t 'font-lock-variable-name-face)) |
304 'mouse-face 'highlight) | 304 'mouse-face 'highlight) |
305 " " (vc-git-permissions-as-string old-perm new-perm) | 305 " " (vc-git-permissions-as-string old-perm new-perm) |
306 " " | 306 " " |
307 (propertize (vc-git-escape-file-name (vc-status-fileinfo->name info)) | 307 (propertize (vc-git-escape-file-name (vc-dir-fileinfo->name info)) |
308 'face 'font-lock-function-name-face | 308 'face 'font-lock-function-name-face |
309 'mouse-face 'highlight) | 309 'mouse-face 'highlight) |
310 (vc-git-file-type-as-string old-perm new-perm) | 310 (vc-git-file-type-as-string old-perm new-perm) |
311 (vc-git-rename-as-string state extra)))) | 311 (vc-git-rename-as-string state extra)))) |
312 | 312 |
385 | 385 |
386 (defun vc-git-dir-status (dir update-function) | 386 (defun vc-git-dir-status (dir update-function) |
387 "Return a list of (FILE STATE EXTRA) entries for DIR." | 387 "Return a list of (FILE STATE EXTRA) entries for DIR." |
388 ;; Further things that would have to be fixed later: | 388 ;; Further things that would have to be fixed later: |
389 ;; - how to handle unregistered directories | 389 ;; - how to handle unregistered directories |
390 ;; - how to support vc-status on a subdir of the project tree | 390 ;; - how to support vc-dir on a subdir of the project tree |
391 (vc-git-dir-status-goto-stage 'update-index nil update-function)) | 391 (vc-git-dir-status-goto-stage 'update-index nil update-function)) |
392 | 392 |
393 (defun vc-git-dir-status-files (dir files default-state update-function) | 393 (defun vc-git-dir-status-files (dir files default-state update-function) |
394 "Return a list of (FILE STATE EXTRA) entries for FILES in DIR." | 394 "Return a list of (FILE STATE EXTRA) entries for FILES in DIR." |
395 (vc-git-dir-status-goto-stage 'update-index files update-function)) | 395 (vc-git-dir-status-goto-stage 'update-index files update-function)) |