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>
(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
(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)))
;; 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)
;; 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.
;;
(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
(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)