From 3281a821f771b2c74fe880f24cc38ce0d25e4d58 Mon Sep 17 00:00:00 2001 From: Dan Nicolaescu Date: Sat, 22 Mar 2008 17:09:33 +0000 Subject: [PATCH] (vc-mtn-state): Support the added state. --- lisp/ChangeLog | 4 ++++ lisp/vc-mtn.el | 9 +++++---- 2 files changed, 9 insertions(+), 4 deletions(-) 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 -- 2.39.2