]> git.eshelyaron.com Git - emacs.git/commitdiff
* vc-hg.el (vc-hg-state):
authorDan Nicolaescu <dann@ics.uci.edu>
Fri, 21 Mar 2008 05:53:48 +0000 (05:53 +0000)
committerDan Nicolaescu <dann@ics.uci.edu>
Fri, 21 Mar 2008 05:53:48 +0000 (05:53 +0000)
* vc-git.el (vc-git-state):
* vc-cvs.el (vc-cvs-parse-status):
* vc-bzr.el (vc-bzr-state): Return 'added when the file is in that
state.

lisp/ChangeLog
lisp/vc-bzr.el
lisp/vc-cvs.el
lisp/vc-git.el
lisp/vc-hg.el

index 718cbf3c29d90fed8b7768e19bec57f2b9bf3ea5..1bc7531e84d0ba4a13deb8d78947499073f1b669 100644 (file)
@@ -1,3 +1,11 @@
+2008-03-21  Dan Nicolaescu  <dann@ics.uci.edu>
+
+       * vc-hg.el (vc-hg-state):
+       * vc-git.el (vc-git-state):
+       * vc-cvs.el (vc-cvs-parse-status):
+       * vc-bzr.el (vc-bzr-state): Return 'added when the file is in that
+       state.
+
 2008-03-20  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * progmodes/compile.el (compile):
index cbfdfaab3ba42c4a8ba1b414e93d04e08c7d5a91..93ffed16c48be41b5ee367e2f82320a0ee28301c 100644 (file)
@@ -223,7 +223,7 @@ If any error occurred in running `bzr status', then return nil."
       (if (cdr result)
           (message "Warnings in `bzr' output: %s" (cdr result)))
       (cdr (assq (car result)
-                 '((added . edited)
+                 '((added . added)
                    (kindchanged . edited)
                    (renamed . edited)
                    (modified . edited)
index 975a24dcd4d4ca717e21be34b17e16dc862a4421..cc63131945e088e778738675f24763cd258d1994 100644 (file)
@@ -860,6 +860,7 @@ state."
             ((string-match "Locally Modified" status)             'edited)
             ((string-match "Needs Merge" status)                  'needs-merge)
             ((string-match "Needs \\(Checkout\\|Patch\\)" status) 'needs-patch)
+            ((string-match "Locally Added" status)                'added)
             (t 'edited))))))))
 
 (defun vc-cvs-dir-state-heuristic (dir)
index c2295ddaddc329ddc91dcfbe309ba9f567e13557..d6e9d674953032e03df502445344ed3a71c57275 100644 (file)
   ;; FIXME: This can't set 'ignored yet
   (vc-git--call nil "add" "--refresh" "--" (file-relative-name file))
   (let ((diff (vc-git--run-command-string file "diff-index" "-z" "HEAD" "--")))
-    (if (and diff (string-match ":[0-7]\\{6\\} [0-7]\\{6\\} [0-9a-f]\\{40\\} [0-9a-f]\\{40\\} [ADMU]\0[^\0]+\0"
+    (if (and diff (string-match ":[0-7]\\{6\\} [0-7]\\{6\\} [0-9a-f]\\{40\\} [0-9a-f]\\{40\\} \\([ADMU]\\)\0[^\0]+\0"
                                 diff))
-        'edited
+       (if (string= (match-string 1 diff) "A") 'added 'edited)
       'up-to-date)))
 
 (defun vc-git--ls-files-state (state &rest args)
index c424dbaa3b6de94c46388cd4cf772e83ce495f56..46617fe19ac648e79bce925054c4e86aff5e52c2 100644 (file)
          (let ((state (aref out 0)))
            (cond
             ((eq state ?=) 'up-to-date)
-            ((eq state ?A) 'edited)
+            ((eq state ?A) 'added)
             ((eq state ?M) 'edited)
             ((eq state ?I) 'ignored)
             ((eq state ?R) 'unregistered)