emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/vc.el,v


From: Eric S. Raymond
Subject: [Emacs-diffs] Changes to emacs/lisp/vc.el,v
Date: Thu, 01 May 2008 19:13:24 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Eric S. Raymond <esr>   08/05/01 19:13:16

Index: vc.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/vc.el,v
retrieving revision 1.602
retrieving revision 1.603
diff -u -b -r1.602 -r1.603
--- vc.el       1 May 2008 17:46:27 -0000       1.602
+++ vc.el       1 May 2008 19:13:16 -0000       1.603
@@ -148,7 +148,8 @@
 ;;   possible values, see `vc-state'.  This function should do a full and
 ;;   reliable state computation; it is usually called immediately after
 ;;   C-x v v.  If you want to use a faster heuristic when visiting a
-;;   file, put that into `state-heuristic' below.
+;;   file, put that into `state-heuristic' below.  Note that under most
+;;   VCSes this won't be called at all, dir-state or dir-stus is used instead.
 ;;
 ;; - state-heuristic (file)
 ;;
@@ -618,12 +619,6 @@
 ;; - 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.
 ;;
-;; - make vc-state for all backends return 'unregistered instead of
-;;   nil for unregistered files, then update vc-next-action.
-;;
-;; - vc-default-registered should return 'unregistered not nil for
-;;   unregistered files.
-;;
 ;; - vc-register should register a fileset at a time. The backends
 ;;   already support this, only the front-end needs to be changed to
 ;;   handle multiple files at a time.
@@ -1661,12 +1656,11 @@
     ;; Do the right thing
     (cond
      ;; Files aren't registered
-     ((or (not state)  ;; RCS uses nil for unregistered files.
-         (eq state 'unregistered)
+     ((or (eq state 'unregistered)
          (eq state 'ignored))
       (mapc 'vc-register files))
      ;; Files are up-to-date, or need a merge and user specified a revision
-     ((or (eq state 'up-to-date) (and verbose (eq state 'needs-patch)))
+     ((or (eq state 'up-to-date) (and verbose (eq state 'needs-update)))
       (cond
        (verbose
        ;; go to a different revision
@@ -1745,8 +1739,8 @@
      ;; conflict
      ((eq state 'conflict)
       (vc-mark-resolved files))
-     ;; needs-patch
-     ((eq state 'needs-patch)
+     ;; needs-update
+     ((eq state 'needs-update)
       (dolist (file files)
        (if (yes-or-no-p (format
                          "%s is not up-to-date.  Get latest revision? "
@@ -1789,7 +1783,10 @@
                    "Revert to checked-in revision, instead? "))
              (error "Checkout aborted")
            (vc-revert-buffer-internal t t)
-           (vc-checkout file t))))))))
+           (vc-checkout file t)))))
+     ;; Unknown fileset state
+     (t
+      (error "Fileset is in an unknown state %s" state)))))
 
 (defun vc-create-repo (backend)
   "Create an empty repository in the current directory."
@@ -1974,7 +1971,7 @@
                              (not writable))
                          (if (vc-call latest-on-branch-p file)
                              'up-to-date
-                           'needs-patch)
+                           'needs-update)
                        'edited))
         (vc-checkout-time . ,(nth 5 (file-attributes file))))))
   (vc-resynch-buffer file t t)
@@ -4277,7 +4274,7 @@
          ((stringp state) (concat "(" state ")"))
          ((eq state 'edited) "(modified)")
          ((eq state 'needs-merge) "(merge)")
-         ((eq state 'needs-patch) "(patch)")
+         ((eq state 'needs-update) "(update)")
          ((eq state 'added) "(added)")
          ((eq state 'removed) "(removed)")
           ((eq state 'ignored) "(ignored)")     ;; dired-hook filters this out




reply via email to

[Prev in Thread] Current Thread [Next in Thread]