]> git.eshelyaron.com Git - emacs.git/commitdiff
* vc.el (vc-switch-backend): Simplify.
authorDan Nicolaescu <dann@ics.uci.edu>
Fri, 20 Jun 2008 17:08:55 +0000 (17:08 +0000)
committerDan Nicolaescu <dann@ics.uci.edu>
Fri, 20 Jun 2008 17:08:55 +0000 (17:08 +0000)
(Todo): Remove solved items.

* vc-cvs.el (vc-cvs-parse-status, vc-cvs-parse-entry): Do not set
the vc-backend property.

lisp/ChangeLog
lisp/vc-cvs.el
lisp/vc.el

index fd0505fa8672a437dce975fa118f23edbb259253..1a8ebbf337f981be8a15570427bea25180db191c 100644 (file)
@@ -1,6 +1,11 @@
 2008-06-20  Dan Nicolaescu  <dann@ics.uci.edu>
 
        * vc.el (vc-dir-hide-up-to-date): Undo previous change.
+       (vc-switch-backend): Simplify.
+       (Todo): Remove solved items.
+       
+       * vc-cvs.el (vc-cvs-parse-status, vc-cvs-parse-entry): Do not set
+       the vc-backend property.
 
 2008-06-20  Stefan Monnier  <monnier@iro.umontreal.ca>
 
index edaf7f08d7c252cc46dffb35a3125e2b2f474798..88d0b717653057f8152781a9c64476e8d5e4b2a5 100644 (file)
@@ -800,7 +800,6 @@ state."
       (cond
        ((re-search-forward "\\=\\([^ \t]+\\)" nil t)
        (setq file (expand-file-name (match-string 1)))
-       (vc-file-setprop file 'vc-backend 'CVS)
        (setq status(if (re-search-forward "\\=[ \t]+Status: \\(.*\\)" nil t)
                         (match-string 1) "Unknown"))
        (when (and full
@@ -1042,7 +1041,6 @@ is non-nil."
   (cond
    ;; entry for a "locally added" file (not yet committed)
    ((looking-at "/[^/]+/0/")
-    (vc-file-setprop file 'vc-backend 'CVS)
     (vc-file-setprop file 'vc-checkout-time 0)
     (vc-file-setprop file 'vc-working-revision "0")
     (if set-state (vc-file-setprop file 'vc-state 'added)))
@@ -1058,7 +1056,6 @@ is non-nil."
             ;; sticky tag
             "\\(.\\|\\)" ;Sticky tag type (date or tag name, could be empty)
             "\\(.*\\)"))               ;Sticky tag
-    (vc-file-setprop file 'vc-backend 'CVS)
     (vc-file-setprop file 'vc-working-revision (match-string 1))
     (vc-file-setprop file 'vc-cvs-sticky-tag
                     (vc-cvs-parse-sticky-tag (match-string 4)
index 0507bf72130d5c95452cc75bea8ccd7eb4055ded..06c28e60d745f8a97e51af6415e4a6a01c4ec2cb 100644 (file)
 ;;   display the branch name in the mode-line. Replace
 ;;   vc-cvs-sticky-tag with that.
 ;;
-;; - C-x v b does switch to a different backend, but the mode line is not
-;;   adapted accordingly.  Also, it considers RCS and CVS to be the same,
-;;   which is pretty confusing.
-;;
 ;; - vc-create-tag and vc-retrieve-tag should update the
 ;;   buffers that might be visiting the affected files.
 ;;
 ;;   the two branches.  Or you locally add file FOO and then pull a
 ;;   change that also adds a new file FOO, ...
 ;;
-;; - C-x v l should insert the file set in the *VC-log* buffer so that
-;;   log-view can recognize it and use it for its commands.
-;;
-;; - vc-diff should be able to show the diff for all files in a
-;;   changeset, especially for VC systems that have per repository
-;;   version numbers.  log-view should take advantage of this.
-;;
 ;; - make it easier to write logs.  Maybe C-x 4 a should add to the log
 ;;   buffer, if one is present, instead of adding to the ChangeLog.
 ;;
@@ -2359,17 +2348,18 @@ To get a prompt, use a prefix argument."
    (list
     (or buffer-file-name
         (error "There is no version-controlled file in this buffer"))
-    (let ((backend (vc-backend buffer-file-name))
+    (let ((crt-bk (vc-backend buffer-file-name))
          (backends nil))
-      (unless backend
+      (unless crt-bk
         (error "File %s is not under version control" buffer-file-name))
       ;; Find the registered backends.
-      (dolist (backend vc-handled-backends)
-       (when (vc-call-backend backend 'registered buffer-file-name)
-         (push backend backends)))
+      (dolist (crt vc-handled-backends)
+       (when (and (vc-call-backend crt 'registered buffer-file-name)
+                  (not (eq crt-bk crt)))
+         (push crt backends)))
       ;; Find the next backend.
-      (let ((def (car (delq backend (append (memq backend backends) backends))))
-           (others (delete backend backends)))
+      (let ((def (car backends))
+           (others backends))
        (cond
         ((null others) (error "No other backend to switch to"))
         (current-prefix-arg
@@ -2379,7 +2369,7 @@ To get a prompt, use a prefix argument."
             (format "Switch to backend [%s]: " def)
             (mapcar (lambda (b) (list (downcase (symbol-name b)))) backends)
             nil t nil nil (downcase (symbol-name def))))))
-       (t def))))))
+        (t def))))))
   (unless (eq backend (vc-backend file))
     (vc-file-clearprops file)
     (vc-file-setprop file 'vc-backend backend)