changeset 102577:a4d2ede95fbd

(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. (vc-next-action): Do not assume that all backends in vc-handled-backends are upper case.
author Dan Nicolaescu <dann@ics.uci.edu>
date Sun, 15 Mar 2009 08:58:02 +0000
parents ca736f834e8c
children b8583acd9747
files lisp/ChangeLog lisp/vc.el
diffstat 2 files changed, 17 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sun Mar 15 08:54:00 2009 +0000
+++ b/lisp/ChangeLog	Sun Mar 15 08:58:02 2009 +0000
@@ -4,6 +4,8 @@
 	pass it down to vc-start-logentry.
 	(vc-next-action, vc-transfer-file): Pass the VC backend to
 	vc-checkin.
+	(vc-next-action): Do not assume that all backends in
+	vc-handled-backends are upper case.
 
 2009-03-15  Chong Yidong  <cyd@stupidchicken.com>
 
--- a/lisp/vc.el	Sun Mar 15 08:54:00 2009 +0000
+++ b/lisp/vc.el	Sun Mar 15 08:58:02 2009 +0000
@@ -1041,9 +1041,12 @@
        (verbose
 	;; go to a different revision
 	(setq revision (read-string "Branch, revision, or backend to move to: "))
-	(let ((vsym (intern-soft (upcase revision))))
-	  (if (member vsym vc-handled-backends)
-	      (dolist (file files) (vc-transfer-file file vsym))
+	(let ((revision-downcase (downcase revision)))
+	  (if (member
+	       revision-downcase
+	       (mapcar (lambda (arg) (downcase (symbol-name arg))) vc-handled-backends))
+	      (let ((vsym (intern-soft revision-downcase)))
+		(dolist (file files) (vc-transfer-file file vsym)))
 	    (dolist (file files)
               (vc-checkout file (eq model 'implicit) revision)))))
        ((not (eq model 'implicit))
@@ -1086,12 +1089,15 @@
 	    (message "No files remain to be committed")
 	  (if (not verbose)
 	      (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 backend revision))))))))
+	    (setq revision (read-string "New revision or backend: "))
+	    (let ((revision-downcase (downcase revision)))
+	      (if (member
+		   revision-downcase
+		   (mapcar (lambda (arg) (downcase (symbol-name arg)))
+			   vc-handled-backends))
+		  (let ((vsym (intern revision-downcase)))
+		    (dolist (file files) (vc-transfer-file file vsym)))
+		(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