diff options
author | Dan Nicolaescu <dann@ics.uci.edu> | 2009-03-15 08:54:00 +0000 |
---|---|---|
committer | Dan Nicolaescu <dann@ics.uci.edu> | 2009-03-15 08:54:00 +0000 |
commit | 01cf1a52ea1969eafdba32e4c4a33766a3a50157 (patch) | |
tree | 2a5077246254a5fad07632103fb9cdc571f1e6ad /lisp | |
parent | 2d78b7e4af075b55474ad9e9474baf900d345420 (diff) | |
download | emacs-01cf1a52ea1969eafdba32e4c4a33766a3a50157.tar.gz emacs-01cf1a52ea1969eafdba32e4c4a33766a3a50157.tar.bz2 emacs-01cf1a52ea1969eafdba32e4c4a33766a3a50157.zip |
(vc-checkin): Add an extra argument for the VC backend,
pass it down to vc-start-logentry.
(vc-next-action, vc-transfer-file): Pass the VC backend to
vc-checkin.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 7 | ||||
-rw-r--r-- | lisp/vc.el | 54 |
2 files changed, 35 insertions, 26 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 724f79b851e..ac1c078f72c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2009-03-15 Dan Nicolaescu <dann@ics.uci.edu> + + * vc.el (vc-checkin): Add an extra argument for the VC backend, + pass it down to vc-start-logentry. + (vc-next-action, vc-transfer-file): Pass the VC backend to + vc-checkin. + 2009-03-15 Chong Yidong <cyd@stupidchicken.com> * files.el (get-free-disk-space): Ensure that default-directory is diff --git a/lisp/vc.el b/lisp/vc.el index 85925442821..61f1bb6369d 100644 --- a/lisp/vc.el +++ b/lisp/vc.el @@ -1085,13 +1085,13 @@ merge in the changes into your working copy." (if (not ready-for-commit) (message "No files remain to be committed") (if (not verbose) - (vc-checkin ready-for-commit) + (vc-checkin ready-for-commit backend) (progn (setq revision (read-string "New revision or backend: ")) (let ((vsym (intern (upcase revision)))) (if (member vsym vc-handled-backends) (dolist (file files) (vc-transfer-file file vsym)) - (vc-checkin ready-for-commit revision)))))))) + (vc-checkin ready-for-commit backend revision)))))))) ;; locked by somebody else (locking VCSes only) ((stringp state) ;; In the old days, we computed the revision once and used it on @@ -1327,7 +1327,7 @@ Type \\[vc-next-action] to check in changes.") ".\n") (message "Please explain why you stole the lock. Type C-c C-c when done."))) -(defun vc-checkin (files &optional rev comment initial-contents) +(defun vc-checkin (files backend &optional rev comment initial-contents) "Check in FILES. The optional argument REV may be a string specifying the new revision level (if nil increment the current level). COMMENT is a comment @@ -1341,28 +1341,30 @@ that the version control system supports this mode of operation. Runs the normal hooks `vc-before-checkin-hook' and `vc-checkin-hook'." (when vc-before-checkin-hook (run-hooks 'vc-before-checkin-hook)) - (vc-start-logentry - files rev comment initial-contents - "Enter a change comment." - "*VC-log*" - (lambda (files rev comment) - (message "Checking in %s..." (vc-delistify files)) - ;; "This log message intentionally left almost blank". - ;; RCS 5.7 gripes about white-space-only comments too. - (or (and comment (string-match "[^\t\n ]" comment)) - (setq comment "*** empty log message ***")) - (with-vc-properties - files - ;; We used to change buffers to get local value of vc-checkin-switches, - ;; but 'the' local buffer is not a well-defined concept for filesets. - (progn - (vc-call checkin files rev comment) - (mapc 'vc-delete-automatic-version-backups files)) - `((vc-state . up-to-date) - (vc-checkout-time . ,(nth 5 (file-attributes file))) - (vc-working-revision . nil))) - (message "Checking in %s...done" (vc-delistify files))) - 'vc-checkin-hook)) + (lexical-let + ((backend backend)) + (vc-start-logentry + files rev comment initial-contents + "Enter a change comment." + "*VC-log*" + (lambda (files rev comment) + (message "Checking in %s..." (vc-delistify files)) + ;; "This log message intentionally left almost blank". + ;; RCS 5.7 gripes about white-space-only comments too. + (or (and comment (string-match "[^\t\n ]" comment)) + (setq comment "*** empty log message ***")) + (with-vc-properties + files + ;; We used to change buffers to get local value of vc-checkin-switches, + ;; but 'the' local buffer is not a well-defined concept for filesets. + (progn + (vc-call-backend backend 'checkin files rev comment) + (mapc 'vc-delete-automatic-version-backups files)) + `((vc-state . up-to-date) + (vc-checkout-time . ,(nth 5 (file-attributes file))) + (vc-working-revision . nil))) + (message "Checking in %s...done" (vc-delistify files))) + 'vc-checkin-hook))) ;;; Additional entry points for examining version histories @@ -2096,7 +2098,7 @@ backend to NEW-BACKEND, and unregister FILE from the current backend. (when (or move edited) (vc-file-setprop file 'vc-state 'edited) (vc-mode-line file) - (vc-checkin file nil comment (stringp comment))))) + (vc-checkin file new-backend nil comment (stringp comment))))) (defun vc-rename-master (oldmaster newfile templates) "Rename OLDMASTER to be the master file for NEWFILE based on TEMPLATES." |