cvs-status.el 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544
  1. ;;; cvs-status.el --- major mode for browsing `cvs status' output -*- coding: utf-8; lexical-binding: t -*-
  2. ;; Copyright (C) 1999-2012 Free Software Foundation, Inc.
  3. ;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
  4. ;; Keywords: pcl-cvs cvs status tree vc tools
  5. ;; This file is part of GNU Emacs.
  6. ;; GNU Emacs is free software: you can redistribute it and/or modify
  7. ;; it under the terms of the GNU General Public License as published by
  8. ;; the Free Software Foundation, either version 3 of the License, or
  9. ;; (at your option) any later version.
  10. ;; GNU Emacs is distributed in the hope that it will be useful,
  11. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ;; GNU General Public License for more details.
  14. ;; You should have received a copy of the GNU General Public License
  15. ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
  16. ;;; Commentary:
  17. ;; Todo:
  18. ;; - Somehow allow cvs-status-tree to work on-the-fly
  19. ;;; Code:
  20. (eval-when-compile (require 'cl))
  21. (require 'pcvs-util)
  22. ;;;
  23. (defgroup cvs-status nil
  24. "Major mode for browsing `cvs status' output."
  25. :group 'pcl-cvs
  26. :prefix "cvs-status-")
  27. (easy-mmode-defmap cvs-status-mode-map
  28. '(("n" . next-line)
  29. ("p" . previous-line)
  30. ("N" . cvs-status-next)
  31. ("P" . cvs-status-prev)
  32. ("\M-n" . cvs-status-next)
  33. ("\M-p" . cvs-status-prev)
  34. ("t" . cvs-status-cvstrees)
  35. ("T" . cvs-status-trees)
  36. (">" . cvs-mode-checkout))
  37. "CVS-Status' keymap."
  38. :group 'cvs-status
  39. :inherit 'cvs-mode-map)
  40. ;;(easy-menu-define cvs-status-menu cvs-status-mode-map
  41. ;; "Menu for `cvs-status-mode'."
  42. ;; '("CVS-Status"
  43. ;; ["Show Tag Trees" cvs-status-tree t]
  44. ;; ))
  45. (defvar cvs-status-mode-hook nil
  46. "Hook run at the end of `cvs-status-mode'.")
  47. (defconst cvs-status-tags-leader-re "^ Existing Tags:$")
  48. (defconst cvs-status-entry-leader-re
  49. "^File:\\s-+\\(?:no file \\)?\\(.*\\S-\\)\\s-+Status: \\(.+\\)$")
  50. (defconst cvs-status-dir-re "^cvs[.ex]* [a-z]+: Examining \\(.+\\)$")
  51. (defconst cvs-status-rev-re "[0-9][.0-9]*\\.[.0-9]*[0-9]")
  52. (defconst cvs-status-tag-re "[ \t]\\([a-zA-Z][^ \t\n.]*\\)")
  53. (defconst cvs-status-font-lock-keywords
  54. `((,cvs-status-entry-leader-re
  55. (1 'cvs-filename)
  56. (2 'cvs-need-action))
  57. (,cvs-status-tags-leader-re
  58. (,cvs-status-rev-re
  59. (save-excursion (re-search-forward "^\n" nil 'move) (point))
  60. (progn (re-search-backward cvs-status-tags-leader-re nil t)
  61. (forward-line 1))
  62. (0 font-lock-comment-face))
  63. (,cvs-status-tag-re
  64. (save-excursion (re-search-forward "^\n" nil 'move) (point))
  65. (progn (re-search-backward cvs-status-tags-leader-re nil t)
  66. (forward-line 1))
  67. (1 font-lock-function-name-face)))))
  68. (defconst cvs-status-font-lock-defaults
  69. '(cvs-status-font-lock-keywords t nil nil nil (font-lock-multiline . t)))
  70. (defvar cvs-minor-wrap-function)
  71. (defvar cvs-force-command)
  72. (defvar cvs-minor-current-files)
  73. (defvar cvs-secondary-branch-prefix)
  74. (defvar cvs-branch-prefix)
  75. (defvar cvs-tag-print-rev)
  76. (put 'cvs-status-mode 'mode-class 'special)
  77. ;;;###autoload
  78. (define-derived-mode cvs-status-mode fundamental-mode "CVS-Status"
  79. "Mode used for cvs status output."
  80. (set (make-local-variable 'font-lock-defaults) cvs-status-font-lock-defaults)
  81. (set (make-local-variable 'cvs-minor-wrap-function) 'cvs-status-minor-wrap))
  82. ;; Define cvs-status-next and cvs-status-prev
  83. (easy-mmode-define-navigation cvs-status cvs-status-entry-leader-re "entry")
  84. (defun cvs-status-current-file ()
  85. (save-excursion
  86. (forward-line 1)
  87. (or (re-search-backward cvs-status-entry-leader-re nil t)
  88. (re-search-forward cvs-status-entry-leader-re))
  89. (let* ((file (match-string 1))
  90. (cvsdir (and (re-search-backward cvs-status-dir-re nil t)
  91. (match-string 1)))
  92. (pcldir (and (if (boundp 'cvs-pcl-cvs-dirchange-re)
  93. (re-search-backward cvs-pcl-cvs-dirchange-re nil t))
  94. (match-string 1)))
  95. (dir ""))
  96. (let ((default-directory ""))
  97. (when pcldir (setq dir (expand-file-name pcldir dir)))
  98. (when cvsdir (setq dir (expand-file-name cvsdir dir)))
  99. (expand-file-name file dir)))))
  100. (defun cvs-status-current-tag ()
  101. (save-excursion
  102. (let ((pt (point))
  103. (col (current-column))
  104. (start (progn (re-search-backward cvs-status-tags-leader-re nil t) (point)))
  105. (end (progn (re-search-forward "^$" nil t) (point))))
  106. (when (and (< start pt) (> end pt))
  107. (goto-char pt)
  108. (end-of-line)
  109. (let ((tag nil) (dist pt) (end (point)))
  110. (beginning-of-line)
  111. (while (re-search-forward cvs-status-tag-re end t)
  112. (let* ((cole (current-column))
  113. (colb (save-excursion
  114. (goto-char (match-beginning 1)) (current-column)))
  115. (ndist (min (abs (- cole col)) (abs (- colb col)))))
  116. (when (< ndist dist)
  117. (setq dist ndist)
  118. (setq tag (match-string 1)))))
  119. tag)))))
  120. (defun cvs-status-minor-wrap (buf f)
  121. (let ((data (with-current-buffer buf
  122. (cons
  123. (cons (cvs-status-current-file)
  124. (cvs-status-current-tag))
  125. (when mark-active
  126. (save-excursion
  127. (goto-char (mark))
  128. (cons (cvs-status-current-file)
  129. (cvs-status-current-tag))))))))
  130. (let ((cvs-branch-prefix (cdar data))
  131. (cvs-secondary-branch-prefix (and (cdar data) (cddr data)))
  132. (cvs-minor-current-files
  133. (cons (caar data)
  134. (when (and (cadr data) (not (equal (caar data) (cadr data))))
  135. (list (cadr data)))))
  136. ;; FIXME: I need to force because the fileinfos are UNKNOWN
  137. (cvs-force-command "/F"))
  138. (funcall f))))
  139. ;;
  140. ;; Tagelt, tag element
  141. ;;
  142. (defstruct (cvs-tag
  143. (:constructor nil)
  144. (:constructor cvs-tag-make
  145. (vlist &optional name type))
  146. (:conc-name cvs-tag->))
  147. vlist
  148. name
  149. type)
  150. (defsubst cvs-status-vl-to-str (vl) (mapconcat 'number-to-string vl "."))
  151. (defun cvs-tag->string (tag)
  152. (if (stringp tag) tag
  153. (let ((name (cvs-tag->name tag))
  154. (vl (cvs-tag->vlist tag)))
  155. (if (null name) (cvs-status-vl-to-str vl)
  156. (let ((rev (if vl (concat " (" (cvs-status-vl-to-str vl) ")") "")))
  157. (if (consp name) (mapcar (lambda (name) (concat name rev)) name)
  158. (concat name rev)))))))
  159. (defun cvs-tag-compare-1 (vl1 vl2)
  160. (cond
  161. ((and (null vl1) (null vl2)) 'equal)
  162. ((null vl1) 'more2)
  163. ((null vl2) 'more1)
  164. (t (let ((v1 (car vl1))
  165. (v2 (car vl2)))
  166. (cond
  167. ((> v1 v2) 'more1)
  168. ((< v1 v2) 'more2)
  169. (t (cvs-tag-compare-1 (cdr vl1) (cdr vl2))))))))
  170. (defsubst cvs-tag-compare (tag1 tag2)
  171. (cvs-tag-compare-1 (cvs-tag->vlist tag1) (cvs-tag->vlist tag2)))
  172. (defun cvs-tag-merge (tag1 tag2)
  173. "Merge TAG1 and TAG2 into one."
  174. (let ((type1 (cvs-tag->type tag1))
  175. (type2 (cvs-tag->type tag2))
  176. (name1 (cvs-tag->name tag1))
  177. (name2 (cvs-tag->name tag2)))
  178. (unless (equal (cvs-tag->vlist tag1) (cvs-tag->vlist tag2))
  179. (setf (cvs-tag->vlist tag1) nil))
  180. (if type1
  181. (unless (or (not type2) (equal type1 type2))
  182. (setf (cvs-tag->type tag1) nil))
  183. (setf (cvs-tag->type tag1) type2))
  184. (if name1
  185. (setf (cvs-tag->name tag1) (cvs-append name1 name2))
  186. (setf (cvs-tag->name tag1) name2))
  187. tag1))
  188. (defun cvs-tree-print (tags printer column)
  189. "Print the tree of TAGS where each tag's string is given by PRINTER.
  190. PRINTER should accept both a tag (in which case it should return a string)
  191. or a string (in which case it should simply return its argument).
  192. A tag cannot be a CONS. The return value can also be a list of strings,
  193. if several nodes where merged into one.
  194. The tree will be printed no closer than column COLUMN."
  195. (let* ((eol (save-excursion (end-of-line) (current-column)))
  196. (column (max (+ eol 2) column)))
  197. (if (null tags) column
  198. (let* ((rev (cvs-car tags))
  199. (name (funcall printer (cvs-car rev)))
  200. (rest (append (cvs-cdr name) (cvs-cdr tags)))
  201. (prefix
  202. (save-excursion
  203. (or (= (forward-line 1) 0) (insert "\n"))
  204. (cvs-tree-print rest printer column))))
  205. (assert (>= prefix column))
  206. (move-to-column prefix t)
  207. (assert (eolp))
  208. (insert (cvs-car name))
  209. (dolist (br (cvs-cdr rev))
  210. (let* ((column (current-column))
  211. (brrev (funcall printer (cvs-car br)))
  212. (brlength (length (cvs-car brrev)))
  213. (brfill (concat (make-string (/ brlength 2) ? ) "|"))
  214. (prefix
  215. (save-excursion
  216. (insert " -- ")
  217. (cvs-tree-print (cvs-append brrev brfill (cvs-cdr br))
  218. printer (current-column)))))
  219. (delete-region (save-excursion (move-to-column prefix) (point))
  220. (point))
  221. (insert " " (make-string (- prefix column 2) ?-) " ")
  222. (end-of-line)))
  223. prefix))))
  224. (defun cvs-tree-merge (tree1 tree2)
  225. "Merge tags trees TREE1 and TREE2 into one.
  226. BEWARE: because of stability issues, this is not a symmetric operation."
  227. (assert (and (listp tree1) (listp tree2)))
  228. (cond
  229. ((null tree1) tree2)
  230. ((null tree2) tree1)
  231. (t
  232. (let* ((rev1 (car tree1))
  233. (tag1 (cvs-car rev1))
  234. (vl1 (cvs-tag->vlist tag1))
  235. (l1 (length vl1))
  236. (rev2 (car tree2))
  237. (tag2 (cvs-car rev2))
  238. (vl2 (cvs-tag->vlist tag2))
  239. (l2 (length vl2)))
  240. (cond
  241. ((= l1 l2)
  242. (case (cvs-tag-compare tag1 tag2)
  243. (more1 (list* rev2 (cvs-tree-merge tree1 (cdr tree2))))
  244. (more2 (list* rev1 (cvs-tree-merge (cdr tree1) tree2)))
  245. (equal
  246. (cons (cons (cvs-tag-merge tag1 tag2)
  247. (cvs-tree-merge (cvs-cdr rev1) (cvs-cdr rev2)))
  248. (cvs-tree-merge (cdr tree1) (cdr tree2))))))
  249. ((> l1 l2)
  250. (cvs-tree-merge
  251. (list (cons (cvs-tag-make (butlast vl1)) tree1)) tree2))
  252. ((< l1 l2)
  253. (cvs-tree-merge
  254. tree1 (list (cons (cvs-tag-make (butlast vl2)) tree2)))))))))
  255. (defun cvs-tag-make-tag (tag)
  256. (let ((vl (mapcar 'string-to-number (split-string (nth 2 tag) "\\."))))
  257. (cvs-tag-make vl (nth 0 tag) (intern (nth 1 tag)))))
  258. (defun cvs-tags->tree (tags)
  259. "Make a tree out of a list of TAGS."
  260. (let ((tags
  261. (mapcar
  262. (lambda (tag)
  263. (let ((tag (cvs-tag-make-tag tag)))
  264. (list (if (not (eq (cvs-tag->type tag) 'branch)) tag
  265. (list (cvs-tag-make (butlast (cvs-tag->vlist tag)))
  266. tag)))))
  267. tags)))
  268. (while (cdr tags)
  269. (let (tl)
  270. (while tags
  271. (push (cvs-tree-merge (pop tags) (pop tags)) tl))
  272. (setq tags (nreverse tl))))
  273. (car tags)))
  274. (defun cvs-status-get-tags ()
  275. "Look for a list of tags, read them in and delete them.
  276. Return nil if there was an empty list of tags and t if there wasn't
  277. even a list. Else, return the list of tags where each element of
  278. the list is a three-string list TAG, KIND, REV."
  279. (let ((tags nil))
  280. (if (not (re-search-forward cvs-status-tags-leader-re nil t)) t
  281. (forward-char 1)
  282. (let ((pt (point))
  283. (lastrev nil)
  284. (case-fold-search t))
  285. (or
  286. (looking-at "\\s-+no\\s-+tags")
  287. (progn ; normal listing
  288. (while (looking-at "^[ \t]+\\([^ \t\n]+\\)[ \t]+(\\([a-z]+\\): \\(.+\\))$")
  289. (push (list (match-string 1) (match-string 2) (match-string 3)) tags)
  290. (forward-line 1))
  291. (unless (looking-at "^$") (setq tags nil) (goto-char pt))
  292. tags)
  293. (progn ; cvstree-style listing
  294. (while (or (looking-at "^ .+\\(.\\) \\([0-9.]+\\): \\([^\n\t .0-9][^\n\t ]*\\)?$")
  295. (and lastrev
  296. (looking-at "^ .+\\(\\) \\(8\\)? \\([^\n\t .0-9][^\n\t ]*\\)$")))
  297. (setq lastrev (or (match-string 2) lastrev))
  298. (push (list (match-string 3)
  299. (if (equal (match-string 1) " ") "branch" "revision")
  300. lastrev) tags)
  301. (forward-line 1))
  302. (unless (looking-at "^$") (setq tags nil) (goto-char pt))
  303. (setq tags (nreverse tags)))
  304. (progn ; new tree style listing
  305. (let* ((re-lead "[ \t]*\\(-+\\)?\\(|\n?[ \t]+\\)*")
  306. (re3 (concat re-lead "\\(\\.\\)?\\(" cvs-status-rev-re "\\)"))
  307. (re2 (concat re-lead cvs-status-tag-re "\\(\\)"))
  308. (re1 (concat re-lead cvs-status-tag-re
  309. " (\\(" cvs-status-rev-re "\\))")))
  310. (while (or (looking-at re1) (looking-at re2) (looking-at re3))
  311. (push (list (match-string 3)
  312. (if (match-string 1) "branch" "revision")
  313. (match-string 4)) tags)
  314. (goto-char (match-end 0))
  315. (when (eolp) (forward-char 1))))
  316. (unless (looking-at "^$") (setq tags nil) (goto-char pt))
  317. (setq tags (nreverse tags))))
  318. (delete-region pt (point)))
  319. tags)))
  320. (defvar font-lock-mode)
  321. ;; (defun cvs-refontify (beg end)
  322. ;; (when (and (boundp 'font-lock-mode)
  323. ;; font-lock-mode
  324. ;; (fboundp 'font-lock-fontify-region))
  325. ;; (font-lock-fontify-region (1- beg) (1+ end))))
  326. (defun cvs-status-trees ()
  327. "Look for a lists of tags, and replace them with trees."
  328. (interactive)
  329. (save-excursion
  330. (goto-char (point-min))
  331. (let ((inhibit-read-only t)
  332. (tags nil))
  333. (while (listp (setq tags (cvs-status-get-tags)))
  334. ;;(let ((pt (save-excursion (forward-line -1) (point))))
  335. (save-restriction
  336. (narrow-to-region (point) (point))
  337. ;;(newline)
  338. (combine-after-change-calls
  339. (cvs-tree-print (cvs-tags->tree tags) 'cvs-tag->string 3)))
  340. ;;(cvs-refontify pt (point))
  341. ;;(sit-for 0)
  342. ;;)
  343. ))))
  344. ;;;;
  345. ;;;; CVSTree-style trees
  346. ;;;;
  347. (defvar cvs-tree-use-jisx0208 nil) ;Old compat var.
  348. (defvar cvs-tree-use-charset
  349. (cond
  350. (cvs-tree-use-jisx0208 'jisx0208)
  351. ((char-displayable-p ?━) 'unicode)
  352. ((char-displayable-p (make-char 'japanese-jisx0208 40 44)) 'jisx0208))
  353. "*Non-nil if we should use the graphical glyphs from `japanese-jisx0208'.
  354. Otherwise, default to ASCII chars like +, - and |.")
  355. (defconst cvs-tree-char-space
  356. (case cvs-tree-use-charset
  357. (jisx0208 (make-char 'japanese-jisx0208 33 33))
  358. (unicode " ")
  359. (t " ")))
  360. (defconst cvs-tree-char-hbar
  361. (case cvs-tree-use-charset
  362. (jisx0208 (make-char 'japanese-jisx0208 40 44))
  363. (unicode "━")
  364. (t "--")))
  365. (defconst cvs-tree-char-vbar
  366. (case cvs-tree-use-charset
  367. (jisx0208 (make-char 'japanese-jisx0208 40 45))
  368. (unicode "┃")
  369. (t "| ")))
  370. (defconst cvs-tree-char-branch
  371. (case cvs-tree-use-charset
  372. (jisx0208 (make-char 'japanese-jisx0208 40 50))
  373. (unicode "┣")
  374. (t "+-")))
  375. (defconst cvs-tree-char-eob ;end of branch
  376. (case cvs-tree-use-charset
  377. (jisx0208 (make-char 'japanese-jisx0208 40 49))
  378. (unicode "┗")
  379. (t "`-")))
  380. (defconst cvs-tree-char-bob ;beginning of branch
  381. (case cvs-tree-use-charset
  382. (jisx0208 (make-char 'japanese-jisx0208 40 51))
  383. (unicode "┳")
  384. (t "+-")))
  385. (defun cvs-tag-lessp (tag1 tag2)
  386. (eq (cvs-tag-compare tag1 tag2) 'more2))
  387. (defvar cvs-tree-nomerge nil)
  388. (defun cvs-status-cvstrees (&optional arg)
  389. "Look for a list of tags, and replace it with a tree.
  390. Optional prefix ARG chooses between two representations."
  391. (interactive "P")
  392. (when (and cvs-tree-use-charset
  393. (not enable-multibyte-characters))
  394. ;; We need to convert the buffer from unibyte to multibyte
  395. ;; since we'll use multibyte chars for the tree.
  396. (let ((modified (buffer-modified-p))
  397. (inhibit-read-only t)
  398. (inhibit-modification-hooks t))
  399. (unwind-protect
  400. (progn
  401. (decode-coding-region (point-min) (point-max) 'undecided)
  402. (set-buffer-multibyte t))
  403. (restore-buffer-modified-p modified))))
  404. (save-excursion
  405. (goto-char (point-min))
  406. (let ((inhibit-read-only t)
  407. (tags nil)
  408. (cvs-tree-nomerge (if arg (not cvs-tree-nomerge) cvs-tree-nomerge)))
  409. (while (listp (setq tags (cvs-status-get-tags)))
  410. (let ((tags (mapcar 'cvs-tag-make-tag tags))
  411. ;;(pt (save-excursion (forward-line -1) (point)))
  412. )
  413. (setq tags (sort tags 'cvs-tag-lessp))
  414. (let* ((first (car tags))
  415. (prev (if (cvs-tag-p first)
  416. (list (car (cvs-tag->vlist first))) nil)))
  417. (combine-after-change-calls
  418. (cvs-tree-tags-insert tags prev))
  419. ;;(cvs-refontify pt (point))
  420. ;;(sit-for 0)
  421. ))))))
  422. (defun cvs-tree-tags-insert (tags prev)
  423. (when tags
  424. (let* ((tag (car tags))
  425. (vlist (cvs-tag->vlist tag))
  426. (nprev ;"next prev"
  427. (let* ((next (cvs-car (cadr tags)))
  428. (nprev (if (and cvs-tree-nomerge next
  429. (equal vlist (cvs-tag->vlist next)))
  430. prev vlist)))
  431. (cvs-map (lambda (v _p) v) nprev prev)))
  432. (after (save-excursion
  433. (newline)
  434. (cvs-tree-tags-insert (cdr tags) nprev)))
  435. (pe t) ;"prev equal"
  436. (nas nil)) ;"next afters" to be returned
  437. (insert " ")
  438. (do* ((vs vlist (cdr vs))
  439. (ps prev (cdr ps))
  440. (as after (cdr as)))
  441. ((and (null as) (null vs) (null ps))
  442. (let ((revname (cvs-status-vl-to-str vlist)))
  443. (if (cvs-every 'identity (cvs-map 'equal prev vlist))
  444. (insert (make-string (+ 4 (length revname)) ? )
  445. (or (cvs-tag->name tag) ""))
  446. (insert " " revname ": " (or (cvs-tag->name tag) "")))))
  447. (let* ((eq (and pe (equal (car ps) (car vs))))
  448. (next-eq (equal (cadr ps) (cadr vs))))
  449. (let* ((na+char
  450. (if (car as)
  451. (if eq
  452. (if next-eq (cons t cvs-tree-char-vbar)
  453. (cons t cvs-tree-char-branch))
  454. (cons nil cvs-tree-char-bob))
  455. (if eq
  456. (if next-eq (cons nil cvs-tree-char-space)
  457. (cons t cvs-tree-char-eob))
  458. (cons nil (if (and (eq (cvs-tag->type tag) 'branch)
  459. (cvs-every 'null as))
  460. cvs-tree-char-space
  461. cvs-tree-char-hbar))))))
  462. (insert (cdr na+char))
  463. (push (car na+char) nas))
  464. (setq pe eq)))
  465. (nreverse nas))))
  466. ;;;;
  467. ;;;; Merged trees from different files
  468. ;;;;
  469. ;; (defun cvs-tree-fuzzy-merge-1 (trees tree prev)
  470. ;; )
  471. ;; (defun cvs-tree-fuzzy-merge (trees tree)
  472. ;; "Do the impossible: merge TREE into TREES."
  473. ;; ())
  474. ;; (defun cvs-tree ()
  475. ;; "Get tags from the status output and merge them all into a big tree."
  476. ;; (save-excursion
  477. ;; (goto-char (point-min))
  478. ;; (let ((inhibit-read-only t)
  479. ;; (trees (make-vector 31 0)) tree)
  480. ;; (while (listp (setq tree (cvs-tags->tree (cvs-status-get-tags))))
  481. ;; (cvs-tree-fuzzy-merge trees tree))
  482. ;; (erase-buffer)
  483. ;; (let ((cvs-tag-print-rev nil))
  484. ;; (cvs-tree-print tree 'cvs-tag->string 3)))))
  485. (provide 'cvs-status)
  486. ;;; cvs-status.el ends here