;ELC ;;; Compiled by mwolson@grepfind.mwolson.org on Thu Jan 24 00:15:29 2008 ;;; from file /stuff/proj/emacs/dvc/mwolson/lisp/baz.el ;;; in Emacs version 23.0.50.2 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. (if (and (boundp 'emacs-version) (< (aref emacs-version (1- (length emacs-version))) ?A) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19.29"))) (error "`baz.el' was compiled for Emacs 19.29 or later")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; #@43 List of commands available only with tla. (defvar baz-tla-only-commands '(tla-tag) (#$ . 584)) #@361 Creates baz- aliases for tla- commands. For each commands beginning with "tla-", except the ones in `baz-tla-only-list', create the corresponding "baz-" alias. Most functions in tla*.el are prefixed with tla-, but this allows you to type M-x baz-whatever RET instead. Some functions are available only with baz. They're prefixed with baz- and have no alias. (defalias 'baz-make-alias-for-tla-commands #[nil "\305\306\307\"\310\211\203; @\211\n\235\2044\311!\312\310O\313\314 P!\315\f!\2043\316\317 \"\2043\320\f\"\210* A\211\204 *\310\207" [tla-cmd #1=#:--cl-dolist-temp-- baz-tla-only-commands tla-cmd-post baz-cmd apropos-internal "^tla-" commandp nil symbol-name 4 intern "baz-" fboundp string-match "^dvc" defalias] 4 (#$ . 686) nil]) (byte-code "\300 \210\301\302\303\"\210\304\305!\207" [baz-make-alias-for-tla-commands eval-after-load "tla" (progn (defalias 'baz--name-construct 'tla--name-construct) (baz-make-alias-for-tla-commands)) require tla] 3) #@169 Create a tag from SOURCE-REVISION to TAG-VERSION. Run baz branch. If SYNCHRONOUSLY is non-nil, the process for tagging runs synchronously. Else it runs asynchronously. (defalias 'baz-branch #[(source-revision tag-version &optional cacherev synchronously) "\203\304\202 \305\306 ?\205\307\n F!\207" [synchronously cacherev source-revision tag-version tla--run-tla-sync tla--run-tla-async "branch" "--no-cacherev"] 5 (#$ . 1667) (list (unless (y-or-n-p "Branch from local tree? ") (tla--name-construct (tla-name-read "Source revision (or version): " 'prompt 'prompt 'prompt 'prompt 'maybe))) (tla--name-construct (tla-name-read "New branch: " 'prompt 'prompt 'prompt 'prompt)) (tla--tag-does-cacherev) nil)]) #@50 Switch to status buffer or run `baz-dvc-status'. (defalias 'baz-status-goto #[(&optional root against) "\303 \204 \304\305!\210\306\307 \"\211\203\310\n!\202\311 *\207" [root default-directory buffer tla-has-status-command error "status not available with this arch branch" dvc-get-buffer status dvc-switch-to-buffer baz-dvc-status] 4 (#$ . 2386) (list (dvc-read-project-tree-maybe (format "Run %s in: " (tla--changes-command))) current-prefix-arg)]) #@139 Run "baz status" in `default-directory', which must be a tree root. Doesn't work with tla. Use `tla-changes' or `tla-tree-lint' instead. (defalias 'baz-dvc-status #[nil "\306 \204 \307\310!\210\311\312 D\313 D\314\315% \203\316\n!\210r\nq\210\317\320 \321\322\323 \324Q\"\"\210\325 \321\326\327C\"\"\210\330 !\210*\331 \210\332 \n\333#\210\334\335\336\n\337\340\341!\211(\nL\210\342\343\344\345\346(D\347FE)%*\207" [default-directory root buffer dvc-switch-to-buffer-first inhibit-read-only dvc-fileinfo-ewoc tla-has-status-command error "status not available with this arch branch" dvc-prepare-changes-buffer last-revision local-tree status baz dvc-switch-to-buffer t ewoc-enter-first vector cl-struct-dvc-fileinfo-message "* Running baz status in tree " "...\n\n" ewoc-enter-last cl-struct-dvc-fileinfo-legacy searching-subtrees ewoc-refresh dvc-save-some-buffers baz--status-internal nil tla--run-tla-async ("inventory" "--nested" "--trees") :related-buffer :finished make-symbol "--buffer-lex--" lambda (&rest --cl-rest--) apply #[(#1=#:G70416 output error status arguments) "\306\307\310rq\210\311 )\312\"\"r\nJq\210\313 @ \314\211\203_ @\315\316\f\"rq\210\317\320 \210)\321 \210\322\323!\210\nJ)\324 \325\326\304\f\314F\"#\210\327\f\nJ#\210) A\211\204*\330 \"\210)\331 *\207" [output subtrees #1# subtree-message subtree #2=#:--cl-dolist-temp-- delete "" split-string buffer-string "\n" tla--changes-find-subtree-message nil dvc-get-buffer-create status t erase-buffer dvc-diff-mode make-local-variable tla--changes-buffer-master-buffer ewoc-enter-after vector cl-struct-dvc-fileinfo-legacy baz--status-internal dvc-ewoc-delete recenter buffer-sub inhibit-read-only dvc-fileinfo-ewoc] 10] quote --cl-rest-- #3=#:--cl-buffer-lex--] 12 (#$ . 2852)]) #@36 Handler for error in "baz status". (defalias 'baz--status-error-handle #[(output error status arguments root buffer master-buffer) "rq\210eb\210\306\307!)\203[\310 \311\312!\311\313!\311\314!\211 L\210 L\210\n L\210\315\316\317\320\321\nD\321 D\321\fD\322\257E+\"\323\324!\210\212\325! \"\210)r q\210\326\327\"\330\"!\210)\331 !)\207\332!\333  \334%\210r q\210\335#) \205}r q\210\336\337$\")\207" [error root #1=#:--cl-master-buffer-lex-- #2=#:--cl-buffer-lex-- #3=#:--cl-root-lex-- buffer looking-at "^Tree is not lint clean" tla--tree-lint-prepare-buffer make-symbol "--root-lex--" "--buffer-lex--" "--master-buffer-lex--" lambda (&rest --cl-rest--) apply #[(#4=#:G70417 #5=#:G70418 #6=#:G70419) "\303J J\nJ#\210\304 J!\207" [#6# #5# #4# baz--status-internal switch-to-buffer] 4] quote --cl-rest-- message "Tree is not lint clean" tla--tree-lint-parse-buffer tla--tree-lint-cursor-goto ewoc-nth 0 switch-to-buffer dvc-show-changes-buffer tla--parse-baz-status "^[^*\\.]" baz-dvc-status ewoc-map #[(fi) "\304!\203G\305Y\203\306H >\204\307\310!\210\311H\211@\312=\2058\n\211A@) =\2058\n\211AA)A\313\240)\207" [fi cl-struct-dvc-fileinfo-legacy-tags x buffer vectorp 2 0 error "dvc-fileinfo-legacy-data accessing a non-dvc-fileinfo-legacy" 1 subtree changes] 3] master-buffer output tla--tree-lint-cookie dvc-buffer-refresh-function dvc-fileinfo-ewoc] 11 (#$ . 4649)]) #@434 Internal function to run "baz status". Run the command in directory ROOT. The output will be displayed in buffer BUFFER. BUFFER must already be in changes mode, but mustn't contain any change information. Only roots of subprojects are already in the ewoc. If MASTER-BUFFER is non-nil, this run of tla changes is done in a nested project of a bigger one. MASTER-BUFFER is the buffer in which the root of the projects is displayed. (defalias 'baz--status-internal #[(root buffer master-buffer) "rq\210\306\307\310\311\312!\311\313!\311\314!\311\315!\211 L\210 L\210\nL\210 pL\210\316\317\320\321\322 D\322\nD\322 D\322\fD\323\257E,\324\311\312!\311\313!\311\314!\211 L\210L\210L\210\316\317\320\325\322D\322D\322D\323\257E+%)\207" [buffer #1=#:--cl--current-buffer--lex-- #2=#:--cl-master-buffer-lex-- #3=#:--cl-buffer-lex-- #4=#:--cl-root-lex-- root tla--run-tla-async ("status") :finished make-symbol "--root-lex--" "--buffer-lex--" "--master-buffer-lex--" "---current-buffer--lex--" lambda #5=(&rest --cl-rest--) apply #[(#6=#:G70424 #7=#:G70425 #8=#:G70426 #9=#:G70427 output error status arguments) "rq\210eb\210\306 \307\310#)\203 \311\n \f JJJ&\207J\203/\312\313 J\"\210\2025\312\314 J\"\210rJq\210\310\315 \210\316\317\320\321 J\322Q\"\"\210J\203wrJq\210\323\324\325\326\327\330D\330D\330D\330 D\331\257E\"\210)\332!*\207" [output tla--files-conflicted-regexp error status arguments #9# re-search-forward nil t baz--status-error-handle message "No changes in subtree %s" "No changes in %s" dvc-fileinfo-delete-messages ewoc-enter-last vector cl-struct-dvc-fileinfo-message "* No changes in " ".\n\n" ewoc-map lambda #5# apply #[(#10=#:G70420 #11=#:G70421 #12=#:G70422 #13=#:G70423 fi) "\304!\203G\305Y\203\306H >\204\307\310!\210\311H\211@\312=\2059\n\211A@) J=\2059\n\211AA)A\313\240)\207" [fi cl-struct-dvc-fileinfo-legacy-tags x #12# vectorp 2 0 error "dvc-fileinfo-legacy-data accessing a non-dvc-fileinfo-legacy" 1 subtree no-changes] 3] quote --cl-rest-- ewoc-refresh #8# #7# #6# inhibit-read-only dvc-fileinfo-ewoc] 10] quote --cl-rest-- :error #[(#14=#:G70428 #15=#:G70429 #16=#:G70430 output error status arguments) "\306 \n \fJ JJ&\207" [output error status arguments #16# #15# baz--status-error-handle #14#] 8] master-buffer #17=#:--cl-master-buffer-lex-- #18=#:--cl-buffer-lex-- #19=#:--cl-root-lex--] 14 (#$ . 6057)]) (defalias 'baz-merge 'tla-star-merge) #@195 Run "baz annotate" on FILE. Shows the result in a buffer, and create an annotation table for the annotated file's buffer. This allows you to run `baz-trace-line' and `baz-trace-line-show-log'. (defalias 'baz-annotate #[(file) "\306!\307!r q\210\310 \203\311\312\313 !\314Q!\203 \315 !\210\316!\210\317!\320 \321\"\f\2035\322 !\210\323\324\325!D\326\327\330!\327\331!\211\" L\210 L\210\332\333\334\335\336 D\336\"D\337\257E*\340\341%-\207" [file buffer default-directory tla-arch-branch dvc-switch-to-buffer-first #1=#:--cl-file-lex-- expand-file-name get-file-buffer buffer-modified-p y-or-n-p "Save buffer " buffer-name "? " save-buffer find-file-noselect tla-tree-root dvc-get-buffer-create annotate dvc-switch-to-buffer tla--run-tla-async "annotate" tla-file-name-relative-to-root :finished make-symbol "--buffer-lex--" "--file-lex--" lambda (&rest --cl-rest--) apply #[(#2=#:G70431 #3=#:G70432 output error status arguments) "rJq\210\303 \210\304 !\210)\305 \210\306 \307\nJ!\"\207" [#3# output #2# erase-buffer insert-buffer-substring tla-annotate-mode baz-parse-annotate find-buffer-visiting] 4] quote --cl-rest-- :error #[(output error status arguments) "\301!\210\302 \207" [error dvc-show-error-buffer dvc-show-last-process-buffer] 2] #4=#:--cl-buffer-lex--] 11 (#$ . 8524) (list (read-file-name "Annotate file: " nil nil t (file-name-nondirectory (or (buffer-file-name) ""))))]) #@62 table line-number -> revision built by `baz-parse-annotate'. (defvar tla-annotation-table nil (#$ . 9940)) #@164 Builds a table line-number -> revision from ANNOTATE-BUFFER. ANNOTATE-BUFFER must be the output of "baz annotate", and BUFFER is the corresponding source buffer. (defalias 'baz-parse-annotate #[(annotate-buffer buffer) "q\210eb\210\306\307!\210\310 \210\311`d\"T\312 \313\"\314\315\316!\2030\n \317\320!I\210 T\320y\210\202r\fq\210\321\305!\210\n\211,\207" [annotate-buffer nb-lines table n buffer tla-annotation-table re-search-forward "^[^ ]*:" beginning-of-line count-lines make-vector "" 0 looking-at "^\\([^ ]*\\):" match-string 1 make-local-variable] 4 (#$ . 10054)]) #@50 Returns the changeset that lead to LINE in FILE. (defalias 'baz-trace-line #[(line buffer) "\204\304\305!\210r q\210\nHt\203\306 !\210 *\207" [tla-annotation-table buffer line changeset error "No annotate table in buffer. Run baz-annotate first." message] 2 (#$ . 10644) (list (count-lines (point-min) (point)) (current-buffer))]) #@58 Show the log of the changeset that lead to LINE in FILE. (defalias 'baz-trace-line-show-log #[(line buffer) "\302\303 \"!\207" [line buffer tla-cat-log baz-trace-line] 4 (#$ . 10988) (list (count-lines (point-min) (point)) (current-buffer))]) (provide 'baz)