+2009-06-22 Dan Nicolaescu <dann@ics.uci.edu>
+
+ * vc-mtn.el (vc-mtn-after-dir-status, vc-mtn-dir-status): New functions.
+
2009-06-23 Kenichi Handa <handa@m17n.org>
* language/korea-util.el (korean-key-bindings): Change the binding
((match-end 2) 'added)
(t 'up-to-date)))))
+(defun vc-mtn-after-dir-status (update-function)
+ (let (result)
+ (goto-char (point-min))
+ (re-search-forward "Current branch: \\(.*\\)\nChanges against parent \\(.*\\)" nil t)
+ (while (re-search-forward
+ "^ \\(?:\\(patched \\)\\|\\(added \\)\\)\\(.*\\)$" nil t)
+ (cond ((match-end 1) (push (list (match-string 3) 'edited) result))
+ ((match-end 2) (push (list (match-string 3) 'added) result))))
+ (funcall update-function result)))
+
+(defun vc-mtn-dir-status (dir update-function)
+ (vc-mtn-command (current-buffer) 'async dir "status")
+ (vc-exec-after
+ `(vc-mtn-after-dir-status (quote ,update-function))))
+
(defun vc-mtn-working-revision (file)
;; If `mtn' fails or returns status>0, or if the search fails, just
;; return nil.