aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Nicolaescu2009-03-15 08:54:00 +0000
committerDan Nicolaescu2009-03-15 08:54:00 +0000
commit01cf1a52ea1969eafdba32e4c4a33766a3a50157 (patch)
tree2a5077246254a5fad07632103fb9cdc571f1e6ad
parent2d78b7e4af075b55474ad9e9474baf900d345420 (diff)
downloademacs-01cf1a52ea1969eafdba32e4c4a33766a3a50157.tar.gz
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.
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/vc.el54
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 @@
12009-03-15 Dan Nicolaescu <dann@ics.uci.edu>
2
3 * vc.el (vc-checkin): Add an extra argument for the VC backend,
4 pass it down to vc-start-logentry.
5 (vc-next-action, vc-transfer-file): Pass the VC backend to
6 vc-checkin.
7
12009-03-15 Chong Yidong <cyd@stupidchicken.com> 82009-03-15 Chong Yidong <cyd@stupidchicken.com>
2 9
3 * files.el (get-free-disk-space): Ensure that default-directory is 10 * 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."
1085 (if (not ready-for-commit) 1085 (if (not ready-for-commit)
1086 (message "No files remain to be committed") 1086 (message "No files remain to be committed")
1087 (if (not verbose) 1087 (if (not verbose)
1088 (vc-checkin ready-for-commit) 1088 (vc-checkin ready-for-commit backend)
1089 (progn 1089 (progn
1090 (setq revision (read-string "New revision or backend: ")) 1090 (setq revision (read-string "New revision or backend: "))
1091 (let ((vsym (intern (upcase revision)))) 1091 (let ((vsym (intern (upcase revision))))
1092 (if (member vsym vc-handled-backends) 1092 (if (member vsym vc-handled-backends)
1093 (dolist (file files) (vc-transfer-file file vsym)) 1093 (dolist (file files) (vc-transfer-file file vsym))
1094 (vc-checkin ready-for-commit revision)))))))) 1094 (vc-checkin ready-for-commit backend revision))))))))
1095 ;; locked by somebody else (locking VCSes only) 1095 ;; locked by somebody else (locking VCSes only)
1096 ((stringp state) 1096 ((stringp state)
1097 ;; In the old days, we computed the revision once and used it on 1097 ;; 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.")
1327 ".\n") 1327 ".\n")
1328 (message "Please explain why you stole the lock. Type C-c C-c when done."))) 1328 (message "Please explain why you stole the lock. Type C-c C-c when done.")))
1329 1329
1330(defun vc-checkin (files &optional rev comment initial-contents) 1330(defun vc-checkin (files backend &optional rev comment initial-contents)
1331 "Check in FILES. 1331 "Check in FILES.
1332The optional argument REV may be a string specifying the new revision 1332The optional argument REV may be a string specifying the new revision
1333level (if nil increment the current level). COMMENT is a comment 1333level (if nil increment the current level). COMMENT is a comment
@@ -1341,28 +1341,30 @@ that the version control system supports this mode of operation.
1341Runs the normal hooks `vc-before-checkin-hook' and `vc-checkin-hook'." 1341Runs the normal hooks `vc-before-checkin-hook' and `vc-checkin-hook'."
1342 (when vc-before-checkin-hook 1342 (when vc-before-checkin-hook
1343 (run-hooks 'vc-before-checkin-hook)) 1343 (run-hooks 'vc-before-checkin-hook))
1344 (vc-start-logentry 1344 (lexical-let
1345 files rev comment initial-contents 1345 ((backend backend))
1346 "Enter a change comment." 1346 (vc-start-logentry
1347 "*VC-log*" 1347 files rev comment initial-contents
1348 (lambda (files rev comment) 1348 "Enter a change comment."
1349 (message "Checking in %s..." (vc-delistify files)) 1349 "*VC-log*"
1350 ;; "This log message intentionally left almost blank". 1350 (lambda (files rev comment)
1351 ;; RCS 5.7 gripes about white-space-only comments too. 1351 (message "Checking in %s..." (vc-delistify files))
1352 (or (and comment (string-match "[^\t\n ]" comment)) 1352 ;; "This log message intentionally left almost blank".
1353 (setq comment "*** empty log message ***")) 1353 ;; RCS 5.7 gripes about white-space-only comments too.
1354 (with-vc-properties 1354 (or (and comment (string-match "[^\t\n ]" comment))
1355 files 1355 (setq comment "*** empty log message ***"))
1356 ;; We used to change buffers to get local value of vc-checkin-switches, 1356 (with-vc-properties
1357 ;; but 'the' local buffer is not a well-defined concept for filesets. 1357 files
1358 (progn 1358 ;; We used to change buffers to get local value of vc-checkin-switches,
1359 (vc-call checkin files rev comment) 1359 ;; but 'the' local buffer is not a well-defined concept for filesets.
1360 (mapc 'vc-delete-automatic-version-backups files)) 1360 (progn
1361 `((vc-state . up-to-date) 1361 (vc-call-backend backend 'checkin files rev comment)
1362 (vc-checkout-time . ,(nth 5 (file-attributes file))) 1362 (mapc 'vc-delete-automatic-version-backups files))
1363 (vc-working-revision . nil))) 1363 `((vc-state . up-to-date)
1364 (message "Checking in %s...done" (vc-delistify files))) 1364 (vc-checkout-time . ,(nth 5 (file-attributes file)))
1365 'vc-checkin-hook)) 1365 (vc-working-revision . nil)))
1366 (message "Checking in %s...done" (vc-delistify files)))
1367 'vc-checkin-hook)))
1366 1368
1367;;; Additional entry points for examining version histories 1369;;; Additional entry points for examining version histories
1368 1370
@@ -2096,7 +2098,7 @@ backend to NEW-BACKEND, and unregister FILE from the current backend.
2096 (when (or move edited) 2098 (when (or move edited)
2097 (vc-file-setprop file 'vc-state 'edited) 2099 (vc-file-setprop file 'vc-state 'edited)
2098 (vc-mode-line file) 2100 (vc-mode-line file)
2099 (vc-checkin file nil comment (stringp comment))))) 2101 (vc-checkin file new-backend nil comment (stringp comment)))))
2100 2102
2101(defun vc-rename-master (oldmaster newfile templates) 2103(defun vc-rename-master (oldmaster newfile templates)
2102 "Rename OLDMASTER to be the master file for NEWFILE based on TEMPLATES." 2104 "Rename OLDMASTER to be the master file for NEWFILE based on TEMPLATES."