comparison lisp/vc-mcvs.el @ 85139:8ba0e30716a5

Terminology cleanup.
author Eric S. Raymond <esr@snark.thyrsus.com>
date Wed, 10 Oct 2007 18:52:45 +0000
parents b98604865ea0
children b16f7408cd3f
comparison
equal deleted inserted replaced
85138:9eb84ff59d9b 85139:8ba0e30716a5
194 (narrow-to-region (match-beginning 0) (match-end 0)) 194 (narrow-to-region (match-beginning 0) (match-end 0))
195 (vc-cvs-parse-status) 195 (vc-cvs-parse-status)
196 (goto-char (point-max)) 196 (goto-char (point-max))
197 (widen))))))) 197 (widen)))))))
198 198
199 (defun vc-mcvs-workfile-version (file) 199 (defun vc-mcvs-working-revision (file)
200 (vc-cvs-workfile-version 200 (vc-cvs-working-revision
201 (expand-file-name (vc-file-getprop file 'mcvs-inode) 201 (expand-file-name (vc-file-getprop file 'mcvs-inode)
202 (vc-file-getprop file 'mcvs-root)))) 202 (vc-file-getprop file 'mcvs-root))))
203 203
204 (defalias 'vc-mcvs-checkout-model 'vc-cvs-checkout-model) 204 (defalias 'vc-mcvs-checkout-model 'vc-cvs-checkout-model)
205 205
251 (and comment (string-match "[^\t\n ]" comment) 251 (and comment (string-match "[^\t\n ]" comment)
252 (concat "-m" comment)) 252 (concat "-m" comment))
253 (vc-switches 'MCVS 'register)) 253 (vc-switches 'MCVS 'register))
254 ;; I'm not sure exactly why, but if we don't setup the inode and root 254 ;; I'm not sure exactly why, but if we don't setup the inode and root
255 ;; prop of the file, things break later on in vc-mode-line that 255 ;; prop of the file, things break later on in vc-mode-line that
256 ;; ends up calling vc-mcvs-workfile-version. 256 ;; ends up calling vc-mcvs-working-revision.
257 ;; We also need to set vc-checkout-time so that vc-workfile-unchanged-p 257 ;; We also need to set vc-checkout-time so that vc-workfile-unchanged-p
258 ;; doesn't try to call `mcvs diff' on the file. 258 ;; doesn't try to call `mcvs diff' on the file.
259 (vc-mcvs-registered file))) 259 (vc-mcvs-registered file)))
260 260
261 (defalias 'vc-mcvs-responsible-p 'vc-mcvs-root 261 (defalias 'vc-mcvs-responsible-p 'vc-mcvs-root
305 ;; Single-file commit? Then update the version by parsing the buffer. 305 ;; Single-file commit? Then update the version by parsing the buffer.
306 ;; Otherwise we can't necessarily tell what goes with what; clear 306 ;; Otherwise we can't necessarily tell what goes with what; clear
307 ;; its properties so they have to be refetched. 307 ;; its properties so they have to be refetched.
308 (if (= (length files) 1) 308 (if (= (length files) 1)
309 (vc-file-setprop 309 (vc-file-setprop
310 (car files) 'vc-workfile-version 310 (car files) 'vc-working-revision
311 (vc-parse-buffer "^\\(new\\|initial\\) revision: \\([0-9.]+\\)" 2)) 311 (vc-parse-buffer "^\\(new\\|initial\\) revision: \\([0-9.]+\\)" 2))
312 (mapc (lambda (file) (vc-file-clearprops file)) files)) 312 (mapc (lambda (file) (vc-file-clearprops file)) files))
313 ;; Anyway, forget the checkout model of the file, because we might have 313 ;; Anyway, forget the checkout model of the file, because we might have
314 ;; guessed wrong when we found the file. After commit, we can 314 ;; guessed wrong when we found the file. After commit, we can
315 ;; tell it from the permissions of the file (see 315 ;; tell it from the permissions of the file (see
320 ;; if this was an explicit check-in (does not include creation of 320 ;; if this was an explicit check-in (does not include creation of
321 ;; a branch), remove the sticky tag. 321 ;; a branch), remove the sticky tag.
322 (if (and rev (not (vc-mcvs-valid-symbolic-tag-name-p rev))) 322 (if (and rev (not (vc-mcvs-valid-symbolic-tag-name-p rev)))
323 (vc-mcvs-command nil 0 files "update" "-A")))) 323 (vc-mcvs-command nil 0 files "update" "-A"))))
324 324
325 (defun vc-mcvs-find-version (file rev buffer) 325 (defun vc-mcvs-find-revision (file rev buffer)
326 (apply 'vc-mcvs-command 326 (apply 'vc-mcvs-command
327 buffer 0 file 327 buffer 0 file
328 "-Q" ; suppress diagnostic output 328 "-Q" ; suppress diagnostic output
329 "update" 329 "update"
330 (and rev (not (string= rev "")) 330 (and rev (not (string= rev ""))
347 (if vc-mcvs-use-edit 347 (if vc-mcvs-use-edit
348 (vc-mcvs-command nil 0 file "edit") 348 (vc-mcvs-command nil 0 file "edit")
349 (set-file-modes file (logior (file-modes file) 128)) 349 (set-file-modes file (logior (file-modes file) 128))
350 (if (equal file buffer-file-name) (toggle-read-only -1)))) 350 (if (equal file buffer-file-name) (toggle-read-only -1))))
351 ;; Check out a particular version (or recreate the file). 351 ;; Check out a particular version (or recreate the file).
352 (vc-file-setprop file 'vc-workfile-version nil) 352 (vc-file-setprop file 'vc-working-revision nil)
353 (apply 'vc-mcvs-command nil 0 file 353 (apply 'vc-mcvs-command nil 0 file
354 (if editable "-w") 354 (if editable "-w")
355 "update" 355 "update"
356 ;; default for verbose checkout: clear the sticky tag so 356 ;; default for verbose checkout: clear the sticky tag so
357 ;; that the actual update will get the head of the trunk 357 ;; that the actual update will get the head of the trunk
387 0))) ; signal success 387 0))) ; signal success
388 388
389 (defun vc-mcvs-merge-news (file) 389 (defun vc-mcvs-merge-news (file)
390 "Merge in any new changes made to FILE." 390 "Merge in any new changes made to FILE."
391 (message "Merging changes into %s..." file) 391 (message "Merging changes into %s..." file)
392 ;; (vc-file-setprop file 'vc-workfile-version nil) 392 ;; (vc-file-setprop file 'vc-working-revision nil)
393 (vc-file-setprop file 'vc-checkout-time 0) 393 (vc-file-setprop file 'vc-checkout-time 0)
394 (vc-mcvs-command nil 0 file "update") 394 (vc-mcvs-command nil 0 file "update")
395 ;; Analyze the merge result reported by Meta-CVS, and set 395 ;; Analyze the merge result reported by Meta-CVS, and set
396 ;; file properties accordingly. 396 ;; file properties accordingly.
397 (with-current-buffer (get-buffer "*vc*") 397 (with-current-buffer (get-buffer "*vc*")
398 (goto-char (point-min)) 398 (goto-char (point-min))
399 ;; get new workfile version 399 ;; get new workfile version
400 (if (re-search-forward 400 (if (re-search-forward
401 "^Merging differences between [0-9.]* and \\([0-9.]*\\) into" nil t) 401 "^Merging differences between [0-9.]* and \\([0-9.]*\\) into" nil t)
402 (vc-file-setprop file 'vc-workfile-version (match-string 1)) 402 (vc-file-setprop file 'vc-working-revision (match-string 1))
403 (vc-file-setprop file 'vc-workfile-version nil)) 403 (vc-file-setprop file 'vc-working-revision nil))
404 ;; get file status 404 ;; get file status
405 (prog1 405 (prog1
406 (if (eq (buffer-size) 0) 406 (if (eq (buffer-size) 0)
407 0 ;; there were no news; indicate success 407 0 ;; there were no news; indicate success
408 (if (re-search-forward 408 (if (re-search-forward
526 (when buffer 526 (when buffer
527 (cond 527 (cond
528 ((or (string= state "U") 528 ((or (string= state "U")
529 (string= state "P")) 529 (string= state "P"))
530 (vc-file-setprop file 'vc-state 'up-to-date) 530 (vc-file-setprop file 'vc-state 'up-to-date)
531 (vc-file-setprop file 'vc-workfile-version nil) 531 (vc-file-setprop file 'vc-working-revision nil)
532 (vc-file-setprop file 'vc-checkout-time 532 (vc-file-setprop file 'vc-checkout-time
533 (nth 5 (file-attributes file)))) 533 (nth 5 (file-attributes file))))
534 ((or (string= state "M") 534 ((or (string= state "M")
535 (string= state "C")) 535 (string= state "C"))
536 (vc-file-setprop file 'vc-state 'edited) 536 (vc-file-setprop file 'vc-state 'edited)
537 (vc-file-setprop file 'vc-workfile-version nil) 537 (vc-file-setprop file 'vc-working-revision nil)
538 (vc-file-setprop file 'vc-checkout-time 0))) 538 (vc-file-setprop file 'vc-checkout-time 0)))
539 (vc-file-setprop file 'vc-mcvs-sticky-tag sticky-tag) 539 (vc-file-setprop file 'vc-mcvs-sticky-tag sticky-tag)
540 (vc-resynch-buffer file t t)))) 540 (vc-resynch-buffer file t t))))
541 (forward-line 1)))))) 541 (forward-line 1))))))
542 542