summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Nicolaescu <dann@ics.uci.edu>2008-10-05 00:08:49 +0000
committerDan Nicolaescu <dann@ics.uci.edu>2008-10-05 00:08:49 +0000
commit11b4001c8ffddf9cdde106409287f2387fd2cd83 (patch)
treeba68714f81d0ba8f79b85537096659ebb1cafbcd
parent97b69a575ab1c737a5a578d06bf29ddc6893ee06 (diff)
downloademacs-11b4001c8ffddf9cdde106409287f2387fd2cd83.tar.gz
emacs-11b4001c8ffddf9cdde106409287f2387fd2cd83.tar.bz2
emacs-11b4001c8ffddf9cdde106409287f2387fd2cd83.zip
(vc-bzr-after-dir-status): Parse the output for non
existent files. (vc-bzr-dir-status-files): New function.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/vc-bzr.el10
2 files changed, 16 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 550d787c753..3144a000500 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -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)
diff --git a/lisp/vc-bzr.el b/lisp/vc-bzr.el
index 45269e5eed9..2fa1ee2509b 100644
--- a/lisp/vc-bzr.el
+++ b/lisp/vc-bzr.el
@@ -611,6 +611,9 @@ stream. Standard error output is discarded."
("? " . 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 @@ stream. Standard error output is discarded."
(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 @@ stream. Standard error output is discarded."
(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)