aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Nicolaescu2008-06-20 17:08:55 +0000
committerDan Nicolaescu2008-06-20 17:08:55 +0000
commit3daebe67ea4d67de8fdc09c72409bcb14e171cb6 (patch)
treeeeceb296d36e9c5567ea9276cbf83a7cb0ae0280
parent3114c2523ade375d8c3ac171af23ee8e49f3c819 (diff)
downloademacs-3daebe67ea4d67de8fdc09c72409bcb14e171cb6.tar.gz
emacs-3daebe67ea4d67de8fdc09c72409bcb14e171cb6.zip
* vc.el (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.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/vc-cvs.el3
-rw-r--r--lisp/vc.el28
3 files changed, 14 insertions, 22 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index fd0505fa867..1a8ebbf337f 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,6 +1,11 @@
12008-06-20 Dan Nicolaescu <dann@ics.uci.edu> 12008-06-20 Dan Nicolaescu <dann@ics.uci.edu>
2 2
3 * vc.el (vc-dir-hide-up-to-date): Undo previous change. 3 * vc.el (vc-dir-hide-up-to-date): Undo previous change.
4 (vc-switch-backend): Simplify.
5 (Todo): Remove solved items.
6
7 * vc-cvs.el (vc-cvs-parse-status, vc-cvs-parse-entry): Do not set
8 the vc-backend property.
4 9
52008-06-20 Stefan Monnier <monnier@iro.umontreal.ca> 102008-06-20 Stefan Monnier <monnier@iro.umontreal.ca>
6 11
diff --git a/lisp/vc-cvs.el b/lisp/vc-cvs.el
index edaf7f08d7c..88d0b717653 100644
--- a/lisp/vc-cvs.el
+++ b/lisp/vc-cvs.el
@@ -800,7 +800,6 @@ state."
800 (cond 800 (cond
801 ((re-search-forward "\\=\\([^ \t]+\\)" nil t) 801 ((re-search-forward "\\=\\([^ \t]+\\)" nil t)
802 (setq file (expand-file-name (match-string 1))) 802 (setq file (expand-file-name (match-string 1)))
803 (vc-file-setprop file 'vc-backend 'CVS)
804 (setq status(if (re-search-forward "\\=[ \t]+Status: \\(.*\\)" nil t) 803 (setq status(if (re-search-forward "\\=[ \t]+Status: \\(.*\\)" nil t)
805 (match-string 1) "Unknown")) 804 (match-string 1) "Unknown"))
806 (when (and full 805 (when (and full
@@ -1042,7 +1041,6 @@ is non-nil."
1042 (cond 1041 (cond
1043 ;; entry for a "locally added" file (not yet committed) 1042 ;; entry for a "locally added" file (not yet committed)
1044 ((looking-at "/[^/]+/0/") 1043 ((looking-at "/[^/]+/0/")
1045 (vc-file-setprop file 'vc-backend 'CVS)
1046 (vc-file-setprop file 'vc-checkout-time 0) 1044 (vc-file-setprop file 'vc-checkout-time 0)
1047 (vc-file-setprop file 'vc-working-revision "0") 1045 (vc-file-setprop file 'vc-working-revision "0")
1048 (if set-state (vc-file-setprop file 'vc-state 'added))) 1046 (if set-state (vc-file-setprop file 'vc-state 'added)))
@@ -1058,7 +1056,6 @@ is non-nil."
1058 ;; sticky tag 1056 ;; sticky tag
1059 "\\(.\\|\\)" ;Sticky tag type (date or tag name, could be empty) 1057 "\\(.\\|\\)" ;Sticky tag type (date or tag name, could be empty)
1060 "\\(.*\\)")) ;Sticky tag 1058 "\\(.*\\)")) ;Sticky tag
1061 (vc-file-setprop file 'vc-backend 'CVS)
1062 (vc-file-setprop file 'vc-working-revision (match-string 1)) 1059 (vc-file-setprop file 'vc-working-revision (match-string 1))
1063 (vc-file-setprop file 'vc-cvs-sticky-tag 1060 (vc-file-setprop file 'vc-cvs-sticky-tag
1064 (vc-cvs-parse-sticky-tag (match-string 4) 1061 (vc-cvs-parse-sticky-tag (match-string 4)
diff --git a/lisp/vc.el b/lisp/vc.el
index 0507bf72130..06c28e60d74 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -573,10 +573,6 @@
573;; display the branch name in the mode-line. Replace 573;; display the branch name in the mode-line. Replace
574;; vc-cvs-sticky-tag with that. 574;; vc-cvs-sticky-tag with that.
575;; 575;;
576;; - C-x v b does switch to a different backend, but the mode line is not
577;; adapted accordingly. Also, it considers RCS and CVS to be the same,
578;; which is pretty confusing.
579;;
580;; - vc-create-tag and vc-retrieve-tag should update the 576;; - vc-create-tag and vc-retrieve-tag should update the
581;; buffers that might be visiting the affected files. 577;; buffers that might be visiting the affected files.
582;; 578;;
@@ -613,13 +609,6 @@
613;; the two branches. Or you locally add file FOO and then pull a 609;; the two branches. Or you locally add file FOO and then pull a
614;; change that also adds a new file FOO, ... 610;; change that also adds a new file FOO, ...
615;; 611;;
616;; - C-x v l should insert the file set in the *VC-log* buffer so that
617;; log-view can recognize it and use it for its commands.
618;;
619;; - vc-diff should be able to show the diff for all files in a
620;; changeset, especially for VC systems that have per repository
621;; version numbers. log-view should take advantage of this.
622;;
623;; - make it easier to write logs. Maybe C-x 4 a should add to the log 612;; - make it easier to write logs. Maybe C-x 4 a should add to the log
624;; buffer, if one is present, instead of adding to the ChangeLog. 613;; buffer, if one is present, instead of adding to the ChangeLog.
625;; 614;;
@@ -2359,17 +2348,18 @@ To get a prompt, use a prefix argument."
2359 (list 2348 (list
2360 (or buffer-file-name 2349 (or buffer-file-name
2361 (error "There is no version-controlled file in this buffer")) 2350 (error "There is no version-controlled file in this buffer"))
2362 (let ((backend (vc-backend buffer-file-name)) 2351 (let ((crt-bk (vc-backend buffer-file-name))
2363 (backends nil)) 2352 (backends nil))
2364 (unless backend 2353 (unless crt-bk
2365 (error "File %s is not under version control" buffer-file-name)) 2354 (error "File %s is not under version control" buffer-file-name))
2366 ;; Find the registered backends. 2355 ;; Find the registered backends.
2367 (dolist (backend vc-handled-backends) 2356 (dolist (crt vc-handled-backends)
2368 (when (vc-call-backend backend 'registered buffer-file-name) 2357 (when (and (vc-call-backend crt 'registered buffer-file-name)
2369 (push backend backends))) 2358 (not (eq crt-bk crt)))
2359 (push crt backends)))
2370 ;; Find the next backend. 2360 ;; Find the next backend.
2371 (let ((def (car (delq backend (append (memq backend backends) backends)))) 2361 (let ((def (car backends))
2372 (others (delete backend backends))) 2362 (others backends))
2373 (cond 2363 (cond
2374 ((null others) (error "No other backend to switch to")) 2364 ((null others) (error "No other backend to switch to"))
2375 (current-prefix-arg 2365 (current-prefix-arg
@@ -2379,7 +2369,7 @@ To get a prompt, use a prefix argument."
2379 (format "Switch to backend [%s]: " def) 2369 (format "Switch to backend [%s]: " def)
2380 (mapcar (lambda (b) (list (downcase (symbol-name b)))) backends) 2370 (mapcar (lambda (b) (list (downcase (symbol-name b)))) backends)
2381 nil t nil nil (downcase (symbol-name def)))))) 2371 nil t nil nil (downcase (symbol-name def))))))
2382 (t def)))))) 2372 (t def))))))
2383 (unless (eq backend (vc-backend file)) 2373 (unless (eq backend (vc-backend file))
2384 (vc-file-clearprops file) 2374 (vc-file-clearprops file)
2385 (vc-file-setprop file 'vc-backend backend) 2375 (vc-file-setprop file 'vc-backend backend)