aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2007-07-17 05:33:17 +0000
committerStefan Monnier2007-07-17 05:33:17 +0000
commit8c58e784d8a3d273adbeb65aff04231209867982 (patch)
tree48def922bfa6259925e80af4b39297ca6de6c606
parent37202eec238d3184d5604738e3f15a02df7dbe6e (diff)
downloademacs-8c58e784d8a3d273adbeb65aff04231209867982.tar.gz
emacs-8c58e784d8a3d273adbeb65aff04231209867982.zip
(vc-bzr-version, vc-bzr-at-least-version, vc-bzr-post-command-function):
Remove. Version 0.8 is already old nowadays, and by the time Emacs-23 comes out, nobody will even remember it has ever existed.
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/vc-bzr.el46
2 files changed, 7 insertions, 46 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index a55210393d9..844aa761019 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
12007-07-17 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * vc-bzr.el (vc-bzr-version, vc-bzr-at-least-version)
4 (vc-bzr-post-command-function): Remove. Version 0.8 is already old
5 nowadays, and by the time Emacs-23 comes out, nobody will even remember
6 it has ever existed.
7
12007-07-17 Dan Nicolaescu <dann@ics.uci.edu> 82007-07-17 Dan Nicolaescu <dann@ics.uci.edu>
2 9
3 * vc.el: Undo previous change. 10 * vc.el: Undo previous change.
diff --git a/lisp/vc-bzr.el b/lisp/vc-bzr.el
index 23ce0d9c17a..583816c4cf5 100644
--- a/lisp/vc-bzr.el
+++ b/lisp/vc-bzr.el
@@ -88,30 +88,6 @@
88 (repeat :tag "Argument List" :value ("") string)) 88 (repeat :tag "Argument List" :value ("") string))
89 :group 'vc-bzr) 89 :group 'vc-bzr)
90 90
91(defvar vc-bzr-version nil
92 "Internal use.")
93
94;; Could be used for compatibility checks if bzr changes.
95(defun vc-bzr-version ()
96 "Return a three-numeric element list with components of the bzr version.
97This is of the form (X Y Z) for revision X.Y.Z. The elements are zero
98if running `vc-bzr-program' doesn't produce the expected output."
99 (or vc-bzr-version
100 (setq vc-bzr-version
101 (let ((s (shell-command-to-string
102 (concat (shell-quote-argument vc-bzr-program)
103 " --version"))))
104 (if (string-match "\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)$" s)
105 (list (string-to-number (match-string 1 s))
106 (string-to-number (match-string 2 s))
107 (string-to-number (match-string 3 s)))
108 '(0 0 0))))))
109
110(defun vc-bzr-at-least-version (vers)
111 "Return t if the bzr command reports being a least version VERS.
112First argument VERS is a list of the form (X Y Z), as returned by `vc-bzr-version'."
113 (version-list-<= vers (vc-bzr-version)))
114
115;; since v0.9, bzr supports removing the progress indicators 91;; since v0.9, bzr supports removing the progress indicators
116;; by setting environment variable BZR_PROGRESS_BAR to "none". 92;; by setting environment variable BZR_PROGRESS_BAR to "none".
117(defun vc-bzr-command (bzr-command buffer okstatus file &rest args) 93(defun vc-bzr-command (bzr-command buffer okstatus file &rest args)
@@ -128,29 +104,7 @@ Invoke the bzr command adding `BZR_PROGRESS_BAR=none' to the environment."
128 (process-connection-type nil)) 104 (process-connection-type nil))
129 (apply 'vc-do-command buffer okstatus vc-bzr-program 105 (apply 'vc-do-command buffer okstatus vc-bzr-program
130 file bzr-command (append vc-bzr-program-args args)))) 106 file bzr-command (append vc-bzr-program-args args))))
131
132(unless (vc-bzr-at-least-version '(0 9))
133 ;; For older versions, we fall back to washing the log buffer
134 ;; when all output has been gathered.
135 (defun vc-bzr-post-command-function (command file flags)
136 "`vc-post-command-functions' function to remove progress messages."
137 ;; Note that using this requires that the vc command is run
138 ;; synchronously. Otherwise, the ^Ms in the leading progress
139 ;; message on stdout cause the stream to be interpreted as having
140 ;; DOS line endings, losing the ^Ms, so the search fails. I don't
141 ;; know how this works under Windows.
142 (when (equal command vc-bzr-program)
143 (save-excursion
144 (goto-char (point-min))
145 (if (looking-at "^\\(\r.*\r\\)[^\r]+$")
146 (replace-match "" nil nil nil 1)))
147 (save-excursion
148 (goto-char (point-min))
149 ;; This is inserted by bzr 0.11 `log', at least
150 (while (looking-at "read knit.*\n")
151 (replace-match "")))))
152 107
153 (add-hook 'vc-post-command-functions 'vc-bzr-post-command-function))
154 108
155;;;###autoload 109;;;###autoload
156(defconst vc-bzr-admin-dirname ".bzr") ; FIXME: "_bzr" on w32? 110(defconst vc-bzr-admin-dirname ".bzr") ; FIXME: "_bzr" on w32?