*** empty log message ***
[bpt/emacs.git] / lisp / vc-cvs.el
index 80c8e52..d976213 100644 (file)
@@ -179,8 +179,7 @@ See also variable `vc-cvs-sticky-date-format-string'."
           (goto-char (point-min))
          (cond
           ((re-search-forward
-            ;; CVS-removed files are not taken under VC control.
-            (concat "^/" (regexp-quote basename) "/[^/-]") nil t)
+            (concat "^/" (regexp-quote basename) "/[^/]") nil t)
            (beginning-of-line)
            (vc-cvs-parse-entry file)
            t)
@@ -909,12 +908,46 @@ state."
              (push (list file status) result))))))
       (goto-char (point-max))
       (widen))
-      (funcall update-function result)))
+      (funcall update-function result))
+  ;; Alternative implementation: use the "update" command instead of
+  ;; the "status" command.
+  ;; (let ((result nil)
+  ;;   (translation '((?? . unregistered)
+  ;;                  (?A . added)
+  ;;                  (?C . conflict)
+  ;;                  (?M . edited)
+  ;;                  (?P . needs-merge)
+  ;;                  (?R . removed)
+  ;;                  (?U . needs-patch))))
+  ;;   (goto-char (point-min))
+  ;;   (while (not (eobp))
+  ;;     (if (looking-at "^[ACMPRU?] \\(.*\\)$")
+  ;;     (push (list (match-string 1) 
+  ;;                 (cdr (assoc (char-after) translation))) 
+  ;;           result)
+  ;;   (cond
+  ;;    ((looking-at "cvs update: warning: \\(.*\\) was lost")
+  ;;     ;; Format is:
+  ;;     ;; cvs update: warning: FILENAME was lost
+  ;;     ;; U FILENAME
+  ;;     (push (list (match-string 1) 'missing) result)
+  ;;     ;; Skip the "U" line
+  ;;     (forward-line 1))
+  ;;    ((looking-at "cvs update: New directory `\\(.*\\)' -- ignored")
+  ;;     (push (list (match-string 1) 'unregistered) result))))
+  ;;     (forward-line 1))
+  ;;   (funcall update-function result)))
+  )
 
 ;; XXX Experimental function for the vc-dired replacement.
 (defun vc-cvs-dir-status (dir update-function)
   "Create a list of conses (file . state) for DIR."
   (vc-cvs-command (current-buffer) 'async dir "status")
+  ;; Alternative implementation: use the "update" command instead of
+  ;; the "status" command.
+  ;; (vc-cvs-command (current-buffer) 'async
+  ;;             (file-relative-name dir)
+  ;;             "-f" "-n" "update" "-d" "-P")
   (vc-exec-after
    `(vc-cvs-after-dir-status (quote ,update-function))))