;ELC ;;; Compiled by mwolson@grepfind.mwolson.org on Thu Jan 24 00:15:34 2008 ;;; from file /stuff/proj/emacs/dvc/mwolson/lisp/xmtn-run.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 "`xmtn-run.el' was compiled for Emacs 19.29 or later")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\300\302!\210\303\304\305\"\207" [require cl dvc-unified define-coding-system-alias xmtn--monotone-normal-form utf-8-unix] 3) (defalias 'xmtn--call-with-environment-for-subprocess #[(xmtn--thunk) "\302\303\304BBB )\207" [process-environment xmtn--thunk "LC_ALL=" "LC_CTYPE=en_US.UTF-8" "LC_MESSAGES=C"] 4]) #@37 Not documented (fn NIL &body BODY) (defalias 'xmtn--with-environment-for-subprocess '(macro . #[(&rest body) "\203\f\211A@\202\302\303\304GD\"\211\203\"\302\303\304 G\305\\D\"\210\306\307\310)BBD\207" [body #1=#:--cl-rest-- signal wrong-number-of-arguments xmtn--with-environment-for-subprocess 0 xmtn--call-with-environment-for-subprocess lambda nil] 6 (#$ . 929)])) #@61 Not documented (fn ROOT ARGUMENTS &rest DVC-RUN-KEYS &key) (defalias 'xmtn--run-command-sync #[(root arguments &rest dvc-run-keys) "\303 \210\304\206 !\305\306\307!*\207" [root default-directory coding-system-for-write xmtn--check-cached-command-version file-truename xmtn--monotone-normal-form xmtn--call-with-environment-for-subprocess #[nil "\304\305\306\307 \205\310\311 !PC\n# $\207" [xmtn-additional-arguments root arguments dvc-run-keys apply dvc-run-dvc-sync xmtn append "--root=" file-truename] 8]] 2 (#$ . 1314)]) #@61 Not documented (fn ROOT ARGUMENTS &rest DVC-RUN-KEYS &key) (defalias 'xmtn--run-command-async #[(root arguments &rest dvc-run-keys) "\303 \210\304\206 !\305\306\307!*\207" [root default-directory coding-system-for-write xmtn--check-cached-command-version file-truename xmtn--monotone-normal-form xmtn--call-with-environment-for-subprocess #[nil "\304\305\306\307 \205\310\311 !PC\n# $\207" [xmtn-additional-arguments root arguments dvc-run-keys apply dvc-run-dvc-async xmtn append "--root=" file-truename] 8]] 2 (#$ . 1853)]) #@77 Not documented (fn BUFFER ROOT ARGUMENTS &rest DVC-RUN-KEYS &key FINISHED) (defalias 'xmtn--command-append-to-buffer-async #[(buffer root arguments &rest dvc-run-keys) "\306>A@\n\2032\n@\307>\203\nAA\211\202 \310>A@\203)\311\211\202 \312\313\n@\"\210\202)\314 \210\315 \206<\f!\316\317\320!+\207" [dvc-run-keys finished #1=#:--cl-keys-- root default-directory coding-system-for-write :finished (:finished :allow-other-keys) :allow-other-keys nil error "Keyword argument %s not one of (:finished)" xmtn--check-cached-command-version file-truename xmtn--monotone-normal-form xmtn--call-with-environment-for-subprocess #[nil "\306\307\310\311 \205\312\313 !PC\n#\314\315\316!\315\317!\211 L\210 L\210\320\321\306\322\323 D\323\fD\324\257E*\325 &\207" [xmtn-additional-arguments root arguments #2=#:--cl-finished-- #3=#:--cl-buffer-- buffer apply dvc-run-dvc-async xmtn append "--root=" file-truename :finished make-symbol "--buffer--" "--finished--" lambda (&rest --cl-rest--) #[(#4=#:G71047 #5=#:G71048 output error status arguments) "rJq\210\212db\210\306\307\n!\210+ J\206\310\n\f  $\207" [#5# inhibit-read-only output #4# error status t insert-buffer-substring dvc-default-finish-function arguments] 5] quote --cl-rest-- :related-buffer finished dvc-run-keys] 13]] 4 (#$ . 2394)]) (defalias 'xmtn--command-lines-future #[(root which-buffer arguments) "\306 \210\307\310!\307\311!\211\312L\210\312L\210\307\313!\211\314 \206\f!\315\316\317\320\321\322\323D\323 D\324\257E!*L\210\317\320\321\325\323\nD\323D\323 D\324\257E+\207" [#1=#:--cl-lines-- #2=#:--cl-got-output-p-- #3=#:--cl-process-- root default-directory coding-system-for-write xmtn--check-cached-command-version make-symbol "--got-output-p--" "--lines--" nil "--process--" file-truename xmtn--monotone-normal-form xmtn--call-with-environment-for-subprocess lambda #4=(&rest --cl-rest--) apply #[(#5=#:G71055 #6=#:G71056) "\306\307\310 \205\311\312 !PC\n#\313\314\315!\211\fL\210\316\317\320\321\322 D\322 D\322D\323\257E)$\207" [xmtn-additional-arguments root arguments #7=#:--cl-which-buffer-- which-buffer #5# dvc-run-dvc-async xmtn append "--root=" file-truename :finished make-symbol "--which-buffer--" lambda #4# apply #[(#8=#:G71052 #9=#:G71053 #10=#:G71054 output error status arguments) "rJ\301=\203\f \202!J\302=\203\n\202!\302\306J\307#\205!\310q\210\212eb\210 \310m\204>\311`\310\210`\"\fB\312y\210\202*\f\237)L\210 \313L\210*\310\207" [#8# output error #9# #11=#:--cl-var-- #10# "ecase failed: %s, %s" (output error) nil buffer-substring-no-properties 1 t] 4] quote --cl-rest-- #6#] 13] quote --cl-rest-- #[(#12=#:G71049 #13=#:G71050 #14=#:G71051) "\303J!\304\235\204\305\306\307\303J!D\"\210\303J!\310=\203#\311J!\204\303J!\312\235\2046\305\306\313\303J!D\"\210\303J!\314=\203W\315J!\316=\203W J\204W\317 \210\320\321!\210\2026 J\204\204\303J!\314=\203t\315J!\316=\203t\305\306\322C\"\210\323\324\325J!\303J!\315J!$\210\nJ\207" [#12# #14# #13# process-status #15=(run exit signal) signal cl-assertion-failed (member (process-status process) '#15#) run accept-process-output #16=(exit signal) (member (process-status process) '#16#) exit process-exit-status 0 discard-input sit-for 0.01 (not (and (eql (process-status process) 'exit) (eql (process-exit-status process) 0))) error "Process %s terminated abnormally, status=%s, exit code=%s" process-name] 6]] 10]) (defalias 'xmtn--command-output-lines-future #[(root arguments) "\302\303 #\207" [root arguments xmtn--command-lines-future output] 4]) (defalias 'xmtn--command-error-output-lines-future #[(root arguments) "\302\303 #\207" [root arguments xmtn--command-lines-future error] 4]) #@76 Run mtn in ROOT with ARGUMENTS and return its output as a list of strings. (defalias 'xmtn--command-output-lines #[(root arguments) "\304 \210\305\306 \206 \n!\307\310\311!\210*\237\211)\207" [accu root default-directory coding-system-for-write xmtn--check-cached-command-version nil file-truename xmtn--monotone-normal-form xmtn--call-with-environment-for-subprocess #[nil "\303\304\305 \205\306\307 !PC\n#\310\311$\207" [xmtn-additional-arguments root arguments dvc-run-dvc-sync xmtn append "--root=" file-truename :finished #[(output error status arguments) "rq\210\212eb\210m?\205\302`\303\210`\" B\304y\210\202*\207" [output accu buffer-substring-no-properties nil 1] 3]] 7]] 3 (#$ . 6110)]) #@139 Run mtn in ROOT with ARGUMENTS and return the one line of output as string. Signals an error if more (or fewer) than one line is output. (defalias 'xmtn--command-output-line #[(root arguments) "\304 \"\211G\305=\204\306\307\nG $\210\n@)\207" [root arguments lines xmtn-executable xmtn--command-output-lines 1 error "Expected precisely one line of output from monotone, got %s: %s %S"] 6 (#$ . 6830)]) (defalias 'xmtn--minimum-required-command-version #[nil "\300\207" [(0 37)] 1]) #@95 Non-nil if mtn automate inventory supports --no-ignore, --no-unknown, --no-unchanged options. (defalias 'xmtn--have-no-ignore #[nil "\300 \301Y\207" [xmtn-dvc-automate-version 7.0] 2 (#$ . 7323)]) (byte-code "\301B\302\301!\204\303\301\304\"\210\305B\302\305!\204\303\305\304\"\210\304\207" [current-load-list xmtn--*cached-command-version* default-boundp set-default nil xmtn--*command-version-cached-for-executable*] 3) (defalias 'xmtn--clear-command-version-cache #[nil "\302\211\211\207" [xmtn--*command-version-cached-for-executable* xmtn--*cached-command-version* nil] 3]) (defalias 'xmtn--cached-command-version #[nil " \232\203\n\207 \304 !\211 \305 \210)\207" [xmtn--*command-version-cached-for-executable* xmtn-executable xmtn--*cached-command-version* executable xmtn--command-version xmtn--check-cached-command-version] 2]) #@269 Return EXECUTABLE's version as a list (MAJOR MINOR REVISION VERSION-STRING). VERSION-STRING is the string printed by mtn --version (with no trailing newline). MAJOR and MINOR are integers, a parsed representation of the version number. REVISION is the revision id. (defalias 'xmtn--command-version #[(executable) "\306\307 \310\"\211\311\312\313\"\314\315\f\"\204\316\317\f\"\210\f\320\224\320\225\321\211\206,\321 \2062\fG W\205\273\fH\211\322=\204S\323=\203o\211 !GW\205d! H)T\202r\320 W\203\235\fH \" H)\211\203\235\324_\\T\211\202t U\204\265\325\326\327\f\206\256\321 OD\"\202\272_).\f\330\224\330\225\321\211\206\316\321 \206\324\fG W\205]\fH\211\322=\204\365\323=\203\211 !GW\205! H)T\202\320 W\203?\fH \" H)\211\203?\324_\\T\211\202 U\204W\325\326\327\f\206P\321 OD\"\202\\_).\331\332\f\"#$\211%$#\fF.\207" [executable xmtn-executable xmtn--*command-version-cached-for-executable* xmtn--*cached-command-version* string end append xmtn--minimum-required-command-version ("xmtn-dummy" "xmtn-dummy") xmtn--command-output-line nil ("--version") string-match "\\`monotone \\([0-9]+\\)\\.\\([0-9]+\\) (base revision: \\([0-9a-f]\\{40\\}\\))\\'" error "Version output from monotone --version did not match expected pattern: %S" 1 0 43 45 10 signal parse-error "not an integer" 2 match-string 3 start index digit integer sign char parse-time-syntax parse-time-digits revision minor major] 9 (#$ . 8182)]) (defalias 'xmtn--check-cached-command-version #[nil "\306 \307 \211G\310U\203 \211A@\202\311\312\313 GD\" \211A@ \211A@ @\n@V\204Y\n@U\203F \211A@)Y\204Y\314 \210\315\316@\211A@) %\210.\313\207" [minimum-version #1=#:--cl-rest-- major minor revision string xmtn--minimum-required-command-version xmtn--cached-command-version 4 signal wrong-number-of-arguments nil xmtn--clear-command-version-cache error "xmtn does not work with mtn versions below %s.%s (%s is %s)" x xmtn-executable] 7]) #@113 Check and display the version identifier of the mtn command. This command resets xmtn's command version cache. (defalias 'xmtn-check-command-version #[nil "\306 \210\307 \211G\310U\203\211A@\202\311\312\313GD\"\211A@\211A@@\314 \211@ \211A@)\315\316\317\320\321BB\322BB\323B\324BB!\203[\325\326\f \n$\210\202`\325\327\f\"\210.\313\207" [#1=#:--cl-rest-- major minor revision version-string latest xmtn--clear-command-version-cache xmtn--cached-command-version 4 signal wrong-number-of-arguments nil xmtn--latest-mtn-release eval xmtn--version-case and = (latest-minor) ((mainline> latest-major latest-minor)) (t) ((t nil)) message "%s (xmtn considers this version newer than %s.%s)" "%s" latest-major x latest-minor] 7 (#$ . 10282) nil]) (defalias 'xmtn--make-version-check-form #[(version-var condition) "\306\307\"\203 \310\207\306\311\"\203\312\207@A\306\n\313\"\203  G\314=\204.\315\316\317C\"\210\306\n\320\"\203L\321\322\323\fD @E\322\324\fD \211A@)EE\202 \306\n\325\"\203s\326\n\323\fD @E\321\322\323\fD @E\n\324\fD \211A@)EEE\202 \306\n\327\"\203\305\326\330\323\fD @E\321\322\323\fD @E\326\330\324\fD \211A@)E\321\322\324\fD \211A@)E\331\332\321\322\333 @E\322\334 \211A@)E\335\336\337\fD\340BBDFEEEEE\202 \306\n\341\"\203\n\342=\203\326\322\202\363\n\343=\203\340\330\202\363\n\344=\203\352\345\202\363\346\347\n\350#\205\363\3120\335\351\f0 B\")D\202 \346\347\n\352#\205 \312)\202m\306\n\353\"\203- G\354=\204#\315\316\355C\"\210\335\351\f @\"D\202m\306\n\356\"\203d\n 1\312\211231:\203\\1@2\351\f2\"3B31A\2111\202@3\237+B\202m\346\347\n\357#\205m\312*\207" [condition arguments operator target-version version-var x memql (t) t (nil) nil (< <= > >= = /= mainline>) 2 signal cl-assertion-failed (eql (length arguments) 2) (=) and = car cadr (< >) or (mainline>) > let ((-latest- (xmtn--latest-mtn-release))) (car -latest-) (cadr -latest-) not equal caddr ((caddr -latest-)) (/= <= >=) /= <= >= < error "ecase failed: %s, %s" (/= <= >=) xmtn--make-version-check-form (= > < mainline> >= <= /=) (not) 1 (eql (length arguments) 1) (and or) (mainline> /= = >= > <= < not or and) negated-operator #1=#:--cl-var-- subform #2=#:--cl-var--] 18]) (defalias 'xmtn--signal-unsupported-version #[(version supported-conditions) "\301\302\303B\"\207" [supported-conditions error "Operation only implemented for monotone versions matching %S" or] 4]) #@36 Not documented (fn &body CLAUSES) (defalias 'xmtn--version-case '(macro . #[(&rest clauses) "\306 \307\310BC\311\312 \313\211\313\n:\2030\n@\211\211A@\314\f\" B B\nA\211\202 \237,\315\316\317 \313\211\313:\203_@\211@\211BA\211\202D\237,DEDC\"BE)\207" [version clauses #1=#:--cl-var-- body condition #2=#:--cl-var-- gensym let ((xmtn--cached-command-version)) cond append nil xmtn--make-version-check-form t xmtn--signal-unsupported-version quote #3=#:--cl-var-- #4=#:--cl-var-- #5=#:--cl-var--] 12 (#$ . 12724)])) (defalias 'xmtn--latest-mtn-release #[nil "\300\207" [(0 35 "f92dd754bf5c1e6eddc9c462b8d68691cfeb7f8b")] 1]) (provide 'xmtn-run)