From 6a3f9bb72de2ea13801701c98fe27fbf41d6a4f4 Mon Sep 17 00:00:00 2001 From: Dan Nicolaescu Date: Fri, 21 Mar 2008 05:53:48 +0000 Subject: [PATCH] * 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. --- lisp/ChangeLog | 8 ++++++++ lisp/vc-bzr.el | 2 +- lisp/vc-cvs.el | 1 + lisp/vc-git.el | 4 ++-- lisp/vc-hg.el | 2 +- 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 718cbf3c29d..1bc7531e84d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2008-03-21 Dan Nicolaescu + + * 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 * progmodes/compile.el (compile): diff --git a/lisp/vc-bzr.el b/lisp/vc-bzr.el index cbfdfaab3ba..93ffed16c48 100644 --- a/lisp/vc-bzr.el +++ b/lisp/vc-bzr.el @@ -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) diff --git a/lisp/vc-cvs.el b/lisp/vc-cvs.el index 975a24dcd4d..cc63131945e 100644 --- a/lisp/vc-cvs.el +++ b/lisp/vc-cvs.el @@ -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) diff --git a/lisp/vc-git.el b/lisp/vc-git.el index c2295ddaddc..d6e9d674953 100644 --- a/lisp/vc-git.el +++ b/lisp/vc-git.el @@ -146,9 +146,9 @@ ;; 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) diff --git a/lisp/vc-hg.el b/lisp/vc-hg.el index c424dbaa3b6..46617fe19ac 100644 --- a/lisp/vc-hg.el +++ b/lisp/vc-hg.el @@ -173,7 +173,7 @@ (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) -- 2.39.5