diff options
author | Eric S. Raymond <[email protected]> | 2008-05-07 21:27:41 +0000 |
---|---|---|
committer | Eric S. Raymond <[email protected]> | 2008-05-07 21:27:41 +0000 |
commit | 4903369afeabaf913164f07fccd285e8284627ff (patch) | |
tree | 493ff84060d00c69c71c88fe713f191f52a24792 /lisp/vc-bzr.el | |
parent | 9ba4a350430255da3e7465325b66ee99e5fdae7e (diff) |
Remove VC-Dired and backend dir-state methods.
Diffstat (limited to 'lisp/vc-bzr.el')
-rw-r--r-- | lisp/vc-bzr.el | 84 |
1 files changed, 0 insertions, 84 deletions
diff --git a/lisp/vc-bzr.el b/lisp/vc-bzr.el index 92e19df924..e721cff288 100644 --- a/lisp/vc-bzr.el +++ b/lisp/vc-bzr.el @@ -564,90 +564,6 @@ stream. Standard error output is discarded." (apply #'call-process command nil (list (current-buffer) nil) nil args) (buffer-substring (point-min) (point-max))))) -;; TODO: it would be nice to mark the conflicted files in VC Dired, -;; and implement a command to run ediff and `bzr resolve' once the -;; changes have been merged. -(defun vc-bzr-dir-state (dir &optional localp) - "Find the VC state of all files in DIR and its subdirectories. -Optional argument LOCALP is always ignored." - (let ((bzr-root-directory (vc-bzr-root dir)) - (at-start t) - current-bzr-state current-vc-state) - ;; Check that DIR is a bzr repository. - (unless (file-name-absolute-p bzr-root-directory) - (error "Cannot find bzr repository for directory `%s'" dir)) - ;; `bzr ls --versioned' lists all versioned files; - ;; assume they are up-to-date, unless we are given - ;; evidence of the contrary. - (setq at-start t) - (with-temp-buffer - (buffer-disable-undo) ;; Because these buffers can get huge - (vc-bzr-command "ls" t 0 nil "--versioned") - (goto-char (point-min)) - (while (or at-start - (eq 0 (forward-line))) - (setq at-start nil) - (let ((file (expand-file-name - (buffer-substring-no-properties - (line-beginning-position) (line-end-position)) - bzr-root-directory))) - ;; files are up-to-date unless they appear in the `bzr - ;; status' output below - (vc-file-setprop file 'vc-state 'up-to-date) - ;; Anyway, we're looking at the output of `bzr ls - ;; --versioned', so we know these files are registered with - ;; Bzr. - (vc-file-setprop file 'vc-backend 'Bzr)))) - ;; `bzr status' reports on added/modified/renamed and unknown/ignored files - (setq at-start t) - (with-temp-buffer - (vc-bzr-command "status" t 0 nil) - (goto-char (point-min)) - (while (or at-start - (eq 0 (forward-line))) - (setq at-start nil) - (cond - ((looking-at "^added") - (setq current-vc-state 'added) - (setq current-bzr-state 'added)) - ((looking-at "^kind changed") - (setq current-vc-state 'edited) - (setq current-bzr-state 'kindchanged)) - ((looking-at "^modified") - (setq current-vc-state 'edited) - (setq current-bzr-state 'modified)) - ((looking-at "^renamed") - (setq current-vc-state 'edited) - (setq current-bzr-state 'renamed)) - ((looking-at "^ignored") - (setq current-vc-state 'ignored) - (setq current-bzr-state 'not-versioned)) - ((looking-at "^unknown") - (setq current-vc-state 'unregistered) - (setq current-bzr-state 'not-versioned)) - ((looking-at " ") - ;; file names are indented by two spaces - (when current-vc-state - (let ((file (expand-file-name - (buffer-substring-no-properties - (match-end 0) (line-end-position)) - bzr-root-directory))) - (vc-file-setprop file 'vc-state current-vc-state) - (vc-file-setprop file 'vc-bzr-state current-bzr-state) - (when (eq 'added current-bzr-state) - (vc-file-setprop file 'vc-working-revision "0")))) - (when (eq 'not-versioned current-bzr-state) - (let ((file (expand-file-name - (buffer-substring-no-properties - (match-end 0) (line-end-position)) - bzr-root-directory))) - (vc-file-setprop file 'vc-backend 'none) - (vc-file-setprop file 'vc-state nil)))) - (t - ;; skip this part of `bzr status' output - (setq current-vc-state nil) - (setq current-bzr-state nil))))))) - (defun vc-bzr-prettify-state-info (file) "Bzr-specific version of `vc-prettify-state-info'." (if (eq 'edited (vc-state file)) |