Mercurial > emacs
changeset 98524:622e1277bbf2
(vc-bzr-after-dir-status): Parse the output for non
existent files.
(vc-bzr-dir-status-files): New function.
author | Dan Nicolaescu <dann@ics.uci.edu> |
---|---|
date | Sun, 05 Oct 2008 00:08:49 +0000 |
parents | 2bd72d98abe8 |
children | b6395ec3de45 |
files | lisp/ChangeLog lisp/vc-bzr.el |
diffstat | 2 files changed, 16 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Sat Oct 04 20:38:22 2008 +0000 +++ b/lisp/ChangeLog Sun Oct 05 00:08:49 2008 +0000 @@ -1,3 +1,9 @@ +2008-10-05 Dan Nicolaescu <dann@ics.uci.edu> + + * vc-bzr.el (vc-bzr-after-dir-status): Parse the output for non + existent files. + (vc-bzr-dir-status-files): New function. + 2008-10-04 Glenn Morris <rgm@gnu.org> * files.el (make-temp-file): Handle empty `prefix'. (Bug#1081)
--- a/lisp/vc-bzr.el Sat Oct 04 20:38:22 2008 +0000 +++ b/lisp/vc-bzr.el Sun Oct 05 00:08:49 2008 +0000 @@ -611,6 +611,9 @@ ("? " . unregistered) ;; No such state, but we need to distinguish this case. ("R " . renamed) + ;; For a non existent file FOO, the output is: + ;; bzr: ERROR: Path(s) do not exist: FOO + ("bzr" . not-found) ;; Ignore "P " and "P." for pending patches. )) (translated nil) @@ -640,6 +643,8 @@ (old-name (match-string 1))) (push (list new-name 'edited (vc-bzr-create-extra-fileinfo old-name)) result))) + ;; do nothing for non existent files + ((eq translated 'not-found)) (t (push (list (buffer-substring-no-properties (+ (point) 4) @@ -654,6 +659,11 @@ (vc-exec-after `(vc-bzr-after-dir-status (quote ,update-function)))) +(defun vc-bzr-dir-status-files (dir files default-state update-function) + "Return a list of conses (file . state) for DIR." + (apply 'vc-bzr-command "status" (current-buffer) 'async dir "-v" "-S" files) + (vc-exec-after + `(vc-bzr-after-dir-status (quote ,update-function)))) ;;; Revision completion (defun vc-bzr-revision-completion-table (files)