comparison lisp/vc.el @ 104618:7c3b132bf9bb

* vc.el (vc-default-prettify-state-info): Remove function, unused. * vc-bzr.el (vc-bzr-prettify-state-info): Remove function, unused.
author Dan Nicolaescu <dann@ics.uci.edu>
date Wed, 26 Aug 2009 07:42:11 +0000
parents 92965f3f01f0
children f4a041a8c69d
comparison
equal deleted inserted replaced
104617:abce8d2d9707 104618:7c3b132bf9bb
222 ;; line string for FILE. The returned string should have a 222 ;; line string for FILE. The returned string should have a
223 ;; `help-echo' property which is the text to be displayed as a 223 ;; `help-echo' property which is the text to be displayed as a
224 ;; tooltip when the mouse hovers over the VC entry on the mode-line. 224 ;; tooltip when the mouse hovers over the VC entry on the mode-line.
225 ;; The default implementation deals well with all states that 225 ;; The default implementation deals well with all states that
226 ;; `vc-state' can return. 226 ;; `vc-state' can return.
227 ;;
228 ;; - prettify-state-info (file)
229 ;;
230 ;; Translate the `vc-state' property of FILE into a string that can be
231 ;; used in a human-readable buffer. The default implementation deals well
232 ;; with all states that `vc-state' can return.
233 ;; 227 ;;
234 ;; STATE-CHANGING FUNCTIONS 228 ;; STATE-CHANGING FUNCTIONS
235 ;; 229 ;;
236 ;; * create-repo (backend) 230 ;; * create-repo (backend)
237 ;; 231 ;;
2387 (vc-call-backend backend 'checkout file nil rev tmpfile) 2381 (vc-call-backend backend 'checkout file nil rev tmpfile)
2388 (with-current-buffer buffer 2382 (with-current-buffer buffer
2389 (insert-file-contents-literally tmpfile))) 2383 (insert-file-contents-literally tmpfile)))
2390 (delete-file tmpfile)))) 2384 (delete-file tmpfile))))
2391 2385
2392 (defun vc-default-prettify-state-info (backend file)
2393 (let* ((state (vc-state file))
2394 (statestring
2395 (cond
2396 ((stringp state) (concat "(locked:" state ")"))
2397 ((eq state 'edited) "(modified)")
2398 ((eq state 'needs-merge) "(merge)")
2399 ((eq state 'needs-update) "(update)")
2400 ((eq state 'added) "(added)")
2401 ((eq state 'removed) "(removed)")
2402 ((eq state 'ignored) "(ignored)")
2403 ((eq state 'unregistered) "(unregistered)")
2404 ((eq state 'unlocked-changes) "(stale)")
2405 (t (format "(unknown:%s)" state))))
2406 (buffer
2407 (get-file-buffer file))
2408 (modflag
2409 (if (and buffer (buffer-modified-p buffer)) "+" "")))
2410 (concat statestring modflag)))
2411
2412 (defun vc-default-rename-file (backend old new) 2386 (defun vc-default-rename-file (backend old new)
2413 (condition-case nil 2387 (condition-case nil
2414 (add-name-to-file old new) 2388 (add-name-to-file old new)
2415 (error (rename-file old new))) 2389 (error (rename-file old new)))
2416 (vc-delete-file old) 2390 (vc-delete-file old)