comparison lisp/vc-hg.el @ 94563:a0bb8ca25a33

Clean up vc*-revision-granularity and vc*-checkout-model.
author Eric S. Raymond <esr@snark.thyrsus.com>
date Fri, 02 May 2008 17:47:25 +0000
parents 16651da1e3ed
children 3bdffe280ad3
comparison
equal deleted inserted replaced
94562:46f178f2b009 94563:a0bb8ca25a33
45 ;; * state (file) OK 45 ;; * state (file) OK
46 ;; - state-heuristic (file) ?? PROBABLY NOT NEEDED 46 ;; - state-heuristic (file) ?? PROBABLY NOT NEEDED
47 ;; - dir-state (dir) OK 47 ;; - dir-state (dir) OK
48 ;; * working-revision (file) OK 48 ;; * working-revision (file) OK
49 ;; - latest-on-branch-p (file) ?? 49 ;; - latest-on-branch-p (file) ??
50 ;; * checkout-model (file) OK 50 ;; * checkout-model (files) OK
51 ;; - workfile-unchanged-p (file) OK 51 ;; - workfile-unchanged-p (file) OK
52 ;; - mode-line-string (file) NOT NEEDED 52 ;; - mode-line-string (file) NOT NEEDED
53 ;; - prettify-state-info (file) OK 53 ;; - prettify-state-info (file) OK
54 ;; STATE-CHANGING FUNCTIONS 54 ;; STATE-CHANGING FUNCTIONS
55 ;; * register (files &optional rev comment) OK 55 ;; * register (files &optional rev comment) OK
129 :group 'vc) 129 :group 'vc)
130 130
131 131
132 ;;; Properties of the backend 132 ;;; Properties of the backend
133 133
134 (defun vc-hg-revision-granularity () 134 (defun vc-hg-revision-granularity () 'repository)
135 'repository) 135 (defun vc-hg-checkout-model (files) 'implicit)
136 136
137 ;;; State querying functions 137 ;;; State querying functions
138 138
139 ;;;###autoload (defun vc-hg-registered (file) 139 ;;;###autoload (defun vc-hg-registered (file)
140 ;;;###autoload "Return non-nil if FILE is registered with hg." 140 ;;;###autoload "Return non-nil if FILE is registered with hg."
441 (coding-system-for-write 'binary)) 441 (coding-system-for-write 'binary))
442 (with-current-buffer (or (get-file-buffer file) (current-buffer)) 442 (with-current-buffer (or (get-file-buffer file) (current-buffer))
443 (if rev 443 (if rev
444 (vc-hg-command t 0 file "cat" "-r" rev) 444 (vc-hg-command t 0 file "cat" "-r" rev)
445 (vc-hg-command t 0 file "cat"))))) 445 (vc-hg-command t 0 file "cat")))))
446
447 (defun vc-hg-checkout-model (files) 'implicit)
448 446
449 ;; Modelled after the similar function in vc-bzr.el 447 ;; Modelled after the similar function in vc-bzr.el
450 (defun vc-hg-workfile-unchanged-p (file) 448 (defun vc-hg-workfile-unchanged-p (file)
451 (eq 'up-to-date (vc-hg-state file))) 449 (eq 'up-to-date (vc-hg-state file)))
452 450