comparison lisp/vc-bzr.el @ 84350:13fc3289f099

(vc-bzr-admin-lastrev): New defconst. (vc-bzr-workfile-version): Use it.
author Romain Francoise <romain@orebokech.com>
date Thu, 06 Sep 2007 19:46:17 +0000
parents 962fb740e73f
children 5039706521c9
comparison
equal deleted inserted replaced
84349:786ae2b7b452 84350:13fc3289f099
103 (concat vc-bzr-admin-dirname "/checkout/dirstate")) 103 (concat vc-bzr-admin-dirname "/checkout/dirstate"))
104 (defconst vc-bzr-admin-branch-format-file 104 (defconst vc-bzr-admin-branch-format-file
105 (concat vc-bzr-admin-dirname "/branch/format")) 105 (concat vc-bzr-admin-dirname "/branch/format"))
106 (defconst vc-bzr-admin-revhistory 106 (defconst vc-bzr-admin-revhistory
107 (concat vc-bzr-admin-dirname "/branch/revision-history")) 107 (concat vc-bzr-admin-dirname "/branch/revision-history"))
108 (defconst vc-bzr-admin-lastrev
109 (concat vc-bzr-admin-dirname "/branch/last-revision"))
108 110
109 ;;;###autoload (defun vc-bzr-registered (file) 111 ;;;###autoload (defun vc-bzr-registered (file)
110 ;;;###autoload (if (vc-find-root file vc-bzr-admin-checkout-format-file) 112 ;;;###autoload (if (vc-find-root file vc-bzr-admin-checkout-format-file)
111 ;;;###autoload (progn 113 ;;;###autoload (progn
112 ;;;###autoload (load "vc-bzr") 114 ;;;###autoload (load "vc-bzr")
239 (defun vc-bzr-workfile-version (file) 241 (defun vc-bzr-workfile-version (file)
240 (lexical-let* 242 (lexical-let*
241 ((rootdir (vc-bzr-root file)) 243 ((rootdir (vc-bzr-root file))
242 (branch-format-file (concat rootdir "/" vc-bzr-admin-branch-format-file)) 244 (branch-format-file (concat rootdir "/" vc-bzr-admin-branch-format-file))
243 (revhistory-file (concat rootdir "/" vc-bzr-admin-revhistory)) 245 (revhistory-file (concat rootdir "/" vc-bzr-admin-revhistory))
244 (lastrev-file (concat rootdir "/" "branch/last-revision"))) 246 (lastrev-file (concat rootdir "/" vc-bzr-admin-lastrev)))
245 ;; Count lines in .bzr/branch/revision-history to avoid forking a 247 ;; Count lines in .bzr/branch/revision-history to avoid forking a
246 ;; bzr process. This looks at internal files. May break if they 248 ;; bzr process. This looks at internal files. May break if they
247 ;; change their format. 249 ;; change their format.
248 (if (file-exists-p branch-format-file) 250 (if (file-exists-p branch-format-file)
249 (with-temp-buffer 251 (with-temp-buffer