Mercurial > emacs
comparison lisp/vc-rcs.el @ 95038:a25916c502ba
(vc-rcs-create-tag): Fix typo in error message and pass backend arg.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Fri, 16 May 2008 08:32:57 +0000 |
parents | 4da572dc4992 |
children | 85ee8c71ce8c |
comparison
equal
deleted
inserted
replaced
95037:aace8f4875d2 | 95038:a25916c502ba |
---|---|
403 "-q" ;; suppress diagnostic output | 403 "-q" ;; suppress diagnostic output |
404 (concat "-p" rev) | 404 (concat "-p" rev) |
405 (vc-switches 'RCS 'checkout))) | 405 (vc-switches 'RCS 'checkout))) |
406 | 406 |
407 (defun vc-rcs-checkout (file &optional editable rev) | 407 (defun vc-rcs-checkout (file &optional editable rev) |
408 "Retrieve a copy of a saved version of FILE. If FILE is a directory, | 408 "Retrieve a copy of a saved version of FILE. If FILE is a directory, |
409 attempt the checkout for all registered files beneath it." | 409 attempt the checkout for all registered files beneath it." |
410 (if (file-directory-p file) | 410 (if (file-directory-p file) |
411 (mapc 'vc-rcs-checkout (vc-expand-dirs (list file))) | 411 (mapc 'vc-rcs-checkout (vc-expand-dirs (list file))) |
412 (let ((file-buffer (get-file-buffer file)) | 412 (let ((file-buffer (get-file-buffer file)) |
413 switches) | 413 switches) |
469 (vc-branch-part new-version)) | 469 (vc-branch-part new-version)) |
470 new-version))))) | 470 new-version))))) |
471 (message "Checking out %s...done" file)))))) | 471 (message "Checking out %s...done" file)))))) |
472 | 472 |
473 (defun vc-rcs-rollback (files) | 473 (defun vc-rcs-rollback (files) |
474 "Roll back, undoing the most recent checkins of FILES. Directories are | 474 "Roll back, undoing the most recent checkins of FILES. Directories are |
475 expanded to all regidtered subfuiles in them." | 475 expanded to all regidtered subfuiles in them." |
476 (if (not files) | 476 (if (not files) |
477 (error "RCS backend doesn't support directory-level rollback.")) | 477 (error "RCS backend doesn't support directory-level rollback.")) |
478 (dolist (file (vc-expand-dirs files)) | 478 (dolist (file (vc-expand-dirs files)) |
479 (let* ((discard (vc-working-revision file)) | 479 (let* ((discard (vc-working-revision file)) |
506 (set-window-configuration config)) | 506 (set-window-configuration config)) |
507 ;; No, it was some other error: re-signal it. | 507 ;; No, it was some other error: re-signal it. |
508 (signal (car err) (cdr err))))))))) | 508 (signal (car err) (cdr err))))))))) |
509 | 509 |
510 (defun vc-rcs-revert (file &optional contents-done) | 510 (defun vc-rcs-revert (file &optional contents-done) |
511 "Revert FILE to the version it was based on. If FILE is a directory, | 511 "Revert FILE to the version it was based on. If FILE is a directory, |
512 revert all registered files beneath it." | 512 revert all registered files beneath it." |
513 (if (file-directory-p file) | 513 (if (file-directory-p file) |
514 (mapc 'vc-rcs-revert (vc-expand-dirs (list file))) | 514 (mapc 'vc-rcs-revert (vc-expand-dirs (list file))) |
515 (vc-do-command "*vc*" 0 "co" (vc-name file) "-f" | 515 (vc-do-command "*vc*" 0 "co" (vc-name file) "-f" |
516 (concat (if (eq (vc-state file) 'edited) "-u" "-r") | 516 (concat (if (eq (vc-state file) 'edited) "-u" "-r") |
790 ;;; Tag system | 790 ;;; Tag system |
791 ;;; | 791 ;;; |
792 | 792 |
793 (defun vc-rcs-create-tag (backend dir name branchp) | 793 (defun vc-rcs-create-tag (backend dir name branchp) |
794 (when branchp | 794 (when branchp |
795 (error "RCS backend %s does not support module branches.")) | 795 (error "RCS backend %s does not support module branches" backend)) |
796 (let ((result (vc-tag-precondition dir))) | 796 (let ((result (vc-tag-precondition dir))) |
797 (if (stringp result) | 797 (if (stringp result) |
798 (error "File %s is not up-to-date" result) | 798 (error "File %s is not up-to-date" result) |
799 (vc-file-tree-walk | 799 (vc-file-tree-walk |
800 dir | 800 dir |