From: Dan Nicolaescu Date: Sat, 22 Mar 2008 17:09:33 +0000 (+0000) Subject: (vc-mtn-state): Support the added state. X-Git-Tag: emacs-pretest-23.0.90~6992 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3281a821f771b2c74fe880f24cc38ce0d25e4d58;p=emacs.git (vc-mtn-state): Support the added state. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3c9f6b2cfee..dbdf5ab03ad 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2008-03-22 Dan Nicolaescu + + * vc-mtn.el (vc-mtn-state): Support the added state. + 2008-03-22 Carsten Dominik * org: New directory for Org-mode. diff --git a/lisp/vc-mtn.el b/lisp/vc-mtn.el index 6a7f72db44b..fd3f48f9105 100644 --- a/lisp/vc-mtn.el +++ b/lisp/vc-mtn.el @@ -76,10 +76,11 @@ (with-temp-buffer (vc-mtn-command t 0 file "status") (goto-char (point-min)) - (re-search-forward "^ \\(?:patched \\(.*\\)\\|no changes$\\)") - (if (match-end 1) - 'edited - 'up-to-date)))) + (re-search-forward + "^ \\(?:\\(patched\\)\\|\\(added\\) \\(?:.*\\)\\)\\|no changes$") + (cond ((match-end 1) 'edited) + ((match-end 2) 'added) + (t 'up-to-date))))) (defun vc-mtn-working-revision (file) ;; If `mtn' fails or returns status>0, or if the search fails, just