;ELC ;;; Compiled by mwolson@grepfind.mwolson.org on Thu Jan 24 00:15:32 2008 ;;; from file /stuff/proj/emacs/dvc/mwolson/lisp/xhg-mq.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 "`xhg-mq.el' was compiled for Emacs 19.29 or later")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\301\302!\210\303B\304\303!\204\305\303\306\"\210\301\207" [current-load-list require xhg xhg-mq-submenu default-boundp set-default ("mq" ["Show mq stack" xhg-mq-show-stack t] ["mq refresh" xhg-qrefresh t] ["mq diff" xhg-qdiff t] ["mq push" xhg-qpush t] ["mq pop" xhg-qpop t] ["mq applied" xhg-qapplied t] ["mq unapplied" xhg-qunapplied t] ["mq series" xhg-qseries t] ["mq delete" xhg-qdelete t] ["mq rename" xhg-qrename t] "--" ["mq init" xhg-qinit t] ["mq new" xhg-qnew t])] 3) #@34 Keymap used for xhg-mq commands. (defvar xhg-mq-sub-mode-map (byte-code "\301 \302\303\304#\210\302\305\306#\210\302\307\310#\210\302\311\312#\210\302\313\314#\210\302\315\316#\210\302\317\320#\210\302\321\322#\210\302\323\324#\210\302\325\326#\210\302\327\330#\210\302\331\332#\210\302\333\334#\210\302\335\336#\210\302\337\340#\210\302\341\342#\210)\207" [map make-sparse-keymap define-key [65] xhg-qapplied [85] xhg-qunapplied [83] xhg-qseries [115] xhg-mq-show-stack [101] xhg-mq-edit-series-file [82] xhg-qrefresh [77] xhg-qrename [80] xhg-qpush [112] xhg-qpop [116] xhg-qtop [43] xhg-qnext [45] xhg-qprev [61] xhg-qdiff [100] xhg-qdelete [78] xhg-qnew [69] xhg-mq-export-via-mail] 4) (#$ . 1086)) #@33 Ewoc cookie for xhg mq buffers. (defvar xhg-mq-cookie nil (#$ . 1813)) #@90 Run hg qinit. When called without a prefix argument run hg qinit -c, otherwise hg qinit. (defalias 'xhg-qinit #[(&optional dir qinit-switch) "\303\304\305\nD\306\307\310\311\312\313\314\315\316\317\320D\257E$)\207" [dir default-directory qinit-switch dvc-run-dvc-sync xhg "qinit" :finished lambda (output error status arguments) apply #[(output error status arguments) "\300\301!\207" [message "hg qinit finished"] 2] output error status arguments quote nil] 14 (#$ . 1890) (list (progn (setq qinit-switch (if current-prefix-arg "" "-c")) (expand-file-name (dvc-read-directory-name (format "Directory for hg qinit %s: " qinit-switch) (or default-directory (getenv "HOME"))))) qinit-switch)]) #@201 Run hg qnew. Asks for the patch name and an optional commit description. If the commit description is not empty, run hg qnew -m "commit description" When called with a prefix argument run hg qnew -f. (defalias 'xhg-qnew #[(patch-name &optional commit-description force) "\303\230\203\304\305\306\307 \205\310\205\311\205\312\312Q\n\257\"\207" [commit-description force patch-name "" nil dvc-run-dvc-sync xhg "qnew" "-f" "-m" "\""] 8 (#$ . 2592) (list (read-from-minibuffer "qnew patch name: ") (read-from-minibuffer "qnew commit message (empty for none): ") current-prefix-arg)]) #@18 Run hg qrefresh. (defalias 'xhg-qrefresh #[nil "\301 \302\303\304C\"\210\305\306\307\"!)\207" [top xhg-qtop dvc-run-dvc-sync xhg "qrefresh" message format "hg qrefresh for %s finished"] 4 (#$ . 3192) nil]) #@65 Run hg qpop. When called with a prefix argument run hg qpop -a. (defalias 'xhg-qpop #[(&optional all) "p\302\303\304\305\306\307 \205 \310D\311\312\313\314&\"!\210\315 \210\316!)\207" [curbuf all message format "qpop -> %s" dvc-run-dvc-sync xhg "qpop" "-a" :finished dvc-output-buffer-handler :error #[(output error status arguments) "\301=\203\n\302\303!\207\302\304\"\207" [status 1 message "no patches applied" "error status: %d"] 3] xhg-mq-maybe-refresh-patch-buffer pop-to-buffer] 10 (#$ . 3406) (list current-prefix-arg)]) #@67 Run hg qpush. When called with a prefix argument run hg qpush -a. (defalias 'xhg-qpush #[(&optional all) "p\302\303\304\305\306\307 \205 \310D\311\312\313\314&\"!\210\315 \210\316!)\207" [curbuf all message format "qpush -> %s" dvc-run-dvc-sync xhg "qpush" "-a" :finished dvc-output-buffer-handler :error #[(output error status arguments) "\301=\203\n\302\303!\207\302\304\"\207" [status 1 message "patch series fully applied" "error status: %d"] 3] xhg-mq-maybe-refresh-patch-buffer pop-to-buffer] 10 (#$ . 3948) (list current-prefix-arg)]) (defalias 'xhg-mq-maybe-refresh-patch-buffer #[nil "\301\302\303\"\211\205rq\210\304 ))\207" [patch-buffer dvc-get-buffer xhg patch-queue dvc-generic-refresh] 4]) #@45 Print an element ELEM of the mq patch list. (defalias 'xhg-mq-printer #[(elem) "@\211A@)\306\211\211\203\232\307!\f9\205)\310\311\312\313\f!\"!\n\2033\n\202A \205A\314 !;\205A\314 !\203^\203Y\315\316\315\260\202_\202_\n\f9\203k\fJ\202l\f\317\320G\305 \321 \322\f\205\204\323\324\304\f\325\257 \205\213\326 D\"BBBB$\210-\202\234-c\207" [elem x help menu keymap face nil copy-sequence substitute-command-keys format "\\{%s}" symbol-name cadr "\n" "================" add-text-properties 0 font-lock-face append mouse-face highlight help-echo dvc-cmenu str dvc-highlight strcpy key-help prefix-help long-help] 15 (#$ . 4670)]) (defalias 'xhg-process-mq-patches #[(cmd-list header refresh-function &optional only-show) "\306\307\310\311\312\313$\"\n\203dp\314\315\311\316\"!\210\317\320 \210 c\210\321\322!\210\323\324\325!!\326\322\327\317#\210 \330\211\203Q@\331\330D\"\210A\211\204:+\332 \210eb\210\333y\210\314 !\210) )\207" [cmd-list patches only-show curbuf inhibit-read-only header delete "" dvc-run-dvc-sync xhg :finished dvc-output-buffer-split-handler pop-to-buffer dvc-get-buffer-create patch-queue t erase-buffer make-local-variable xhg-mq-cookie ewoc-create dvc-ewoc-create-api-select xhg-mq-printer put permanent-local nil ewoc-enter-last xhg-mq-mode 1 patch #1=#:--cl-dolist-temp-- refresh-function dvc-buffer-refresh-function] 7]) #@18 Run hg qapplied. (defalias 'xhg-qapplied #[nil "\300\301\302\303t$\207" [xhg-process-mq-patches ("qapplied") "hg qapplied:" xhg-qapplied] 5 (#$ . 6106) nil]) #@20 Run hg qunapplied. (defalias 'xhg-qunapplied #[nil "\300\301\302\303t$\207" [xhg-process-mq-patches ("qunapplied") "hg qunapplied:" xhg-qunapplied] 5 (#$ . 6270) nil]) #@17 Run hg qseries. (defalias 'xhg-qseries #[nil "\300\301\302\303t$\207" [xhg-process-mq-patches ("qseries") "hg series:" xhg-qseries] 5 (#$ . 6444) nil]) #@15 Run hg qdiff. (defalias 'xhg-qdiff #[(&optional file) "p\302\303\304 D\305\306\307\310 \"$\210r\311q\210\312 \210)\313!)\207" [curbuf file dvc-run-dvc-display-as-info xhg "qdiff" nil format "hg qdiff %s:\n" xhg-qtop "*xhg-info*" diff-mode pop-to-buffer] 7 (#$ . 6602) nil]) #@16 Run hg qdelete (defalias 'xhg-qdelete #[(patch) "\205 \301\302\303D\"\210\304 \207" [patch dvc-run-dvc-sync xhg "qdelete" xhg-mq-maybe-refresh-patch-buffer] 4 (#$ . 6884) (list (let ((unapplied (xhg-qunapplied))) (if unapplied (dvc-completing-read "Delete mq patch: " unapplied nil t (car (member (xhg-mq-patch-name-at-point) unapplied))) (message "No unapplied patch to delete from the mq series file") nil)))]) #@16 Run hg qrename (defalias 'xhg-qrename #[(from to) "\302\303 #\210\205 \205\304\305\306 E\"\207" [from to message "Running hg qrename %s %s" dvc-run-dvc-sync xhg "qrename"] 5 (#$ . 7306) (let ((old-name (or (xhg-mq-patch-name-at-point) (xhg-qtop)))) (list old-name (if old-name (read-from-minibuffer (format "Rename mq patch '%s' to: " old-name) old-name) (message "No mq patch to rename found") nil)))]) #@18 Run hg qversion. (defalias 'xhg-qversion #[nil "\302\303\304\305\306$\307\211\203\310\311 \312\"8t\203\313\314\"\210*\207" [version-string version dvc-run-dvc-sync xhg ("qversion") :finished dvc-output-buffer-handler nil 2 split-string " " message "Mercurial mq version: %s"] 6 (#$ . 7723) nil]) #@14 Run hg qtop. (defalias 'xhg-qtop #[nil "\301\302\303\304\305\306\307&t\203\203\310\311\"\210\202\310\312!\210)\207" [top dvc-run-dvc-sync xhg ("qtop") :finished dvc-output-buffer-handler :error #[(output error status arguments) "\300\207" [nil] 1] message "Mercurial qtop: %s" "Mercurial qtop: no patches applied"] 7 (#$ . 8034) nil]) #@15 Run hg qnext. (defalias 'xhg-qnext #[nil "\301\302\303\304\305$t\203\306\307\"\210)\207" [next dvc-run-dvc-sync xhg ("qnext") :finished dvc-output-buffer-handler message "Mercurial qnext: %s"] 5 (#$ . 8386) nil]) #@15 Run hg qprev. (defalias 'xhg-qprev #[nil "\301\302\303\304\305$t\203\306\307\"\210)\207" [prev dvc-run-dvc-sync xhg ("qprev") :finished dvc-output-buffer-handler message "Mercurial qprev: %s"] 5 (#$ . 8610) nil]) #@17 Run hg qheader. (defalias 'xhg-qheader #[(patch) "\302\303\304D\305\306$t\203\307\310 \"\210 )\207" [patch header dvc-run-dvc-sync xhg "qheader" :finished dvc-output-buffer-handler message "Mercurial qheader: %s"] 5 (#$ . 8834) (list (xhg-mq-patch-name-at-point))]) (defalias 'xhg-mq-patch-file-name #[(patch) "\301 \302Q\207" [patch xhg-tree-root "/.hg/patches/"] 3]) #@174 Prepare an email that contains a mq patch. `xhg-submit-patch-mapping' is honored for the destination email address and the project name that is used in the generated email. (defalias 'xhg-mq-export-via-mail #[(patch) "\306\307\306\211\f\306\211!\203A!@\310 @!\310\311 !\230\2038 \211\"A@)@ \211\"A@)\211\"A@)!A\211!\204*\312\313#\n#\210\310$! \206R\307\314#\315\260\316\317#! \320\211$\210\321\322!\210\323 \210\324\n\306\211\211\211%&\210 \203\201 \325#Q\202\203#`d|\210\326 \327\"\210eb\210\330\331!\210\332Pc\210\333\334\306\320#\203\244\335y\210\336 !\210\337\340!,\207" [subject base-file-name destination-email file-name xhg-submit-patch-mapping m nil "" dvc-uniquify-file-name xhg-tree-root message "Preparing an email for the mq patch '%s' for '%s'" "-" ".patch" copy-file xhg-mq-patch-file-name t require reporter delete-other-windows reporter-submit-bug-report ": " mml-attach-file "text/x-patch" mail-position-on-field "Subject" "[MQ-PATCH] " search-forward "<>" 1 find-file-other-window other-window -1 #1=#:--cl-dolist-temp-- x patch dvc-temp-directory dvc-patch-email-message-body-template] 7 (#$ . 9215) (list (let ((series (xhg-qseries))) (dvc-completing-read "Send mq patch via mail: " series nil t (car (member (xhg-mq-patch-name-at-point) series)))))]) #@20 Show the mq stack. (defalias 'xhg-mq-show-stack #[nil "\306\307\310\311t$\210\312 \313 \314 \315r\316\317\320\"q\210\315eb\210\321\322!\210\323\324`dS\"!\325 \n\"#\n\315$\211%\203]%@$eb\210\326\327$\330Q\315\331#\203T\332 A\315\240\210%A\211%\204:* \315&\211'\203\213'@&eb\210\326\327&\330Q\315\331#\203\202\332 A\333\240\210'A\211'\204h* \315(\211)\203\310)@\211(\f\235\204\277eb\210\326\327(\330Q\315\331#\203\277\334\335(\"\210\336*\337*!\"\210)A\211)\204\226* \203\344eb\210\326\327 \330Q\315\331#\203\344\340 \332 A\341\240\210\342*!\210\205\357b.\207" [top-pos top unapplied applied act-patches old-applied-patches xhg-process-mq-patches ("qseries") "hg stack:" xhg-mq-show-stack xhg-qapplied xhg-qunapplied xhg-qtop nil dvc-get-buffer xhg patch-queue next-line 1 split-string buffer-substring-no-properties append re-search-forward "^" "$" t xhg-mq-ewoc-data-at-point dvc-move message "Patch %s no longer present" dvc-ewoc-delete ewoc-locate line-beginning-position bold ewoc-refresh buffer-read-only u #1=#:--cl-dolist-temp-- a #2=#:--cl-dolist-temp-- p #3=#:--cl-dolist-temp-- xhg-mq-cookie] 5 (#$ . 10539) nil]) #@34 Show the diff for a given patch. (defalias 'xhg-qdiff-at-point #[(&optional patch) "\206\303 p\304\305\n!!\210\306\307!\210\310 \210\311 !*\207" [patch cur-buf patch-name xhg-mq-patch-name-at-point find-file-other-window xhg-mq-patch-file-name toggle-read-only 1 diff-mode pop-to-buffer] 3 (#$ . 11716) nil]) #@33 Keymap used in a xhg mq buffer. (defvar xhg-mq-mode-map (byte-code "\303 \304\305\306!\307#\210\304 \310#\210\304\311\312#\210\304\313\314#\210\304\315\316#\210\304\317\320#\210\304\321\322#\210\304\323\324#\210\304\325\326#\210\304\327\330#\210\304\331\332#\210\304\333\n#\210)\207" [map dvc-keyvec-quit xhg-mq-sub-mode-map make-sparse-keymap define-key dvc-prefix-buffer 76 dvc-open-internal-log-buffer dvc-buffer-quit [103] dvc-generic-refresh [101] xhg-mq-edit-series-file [down] xhg-mq-next [up] xhg-mq-previous [80] xhg-qpush [112] xhg-qpop [61] xhg-qdiff-at-point [69] xhg-mq-export-via-mail [77] xhg-qrename [81]] 4) (#$ . 12036)) #@20 `xhg-mq-mode' menu (defvar xhg-mq-mode-menu nil (#$ . 12695)) (byte-code "\304\305\306 $\210\307\310N\204\311\307\310\312#\210\313\300!\204\311\300\314\315#\210\300\nB\316\300!\204/\317\300\320 \"\210\313\321!\204;\311\321\314\315#\210\321\nB\316\321!\204K\317\321\322 \"\210\311\303\314\315#\210\303\nB\316\303!\204e\317\303\323\303\324\"\210 \"\210\311\315\325\324#\207" [xhg-mq-mode-map xhg-mq-submenu current-load-list xhg-mq-mode-abbrev-table easy-menu-do-define xhg-mq-mode-menu "`xhg-mq-mode' menu" xhg-mq-mode-hook variable-documentation put "Hook run when entering xhg mq mode mode.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" boundp definition-name xhg-mq-mode default-boundp set-default make-sparse-keymap xhg-mq-mode-syntax-table make-syntax-table define-abbrev-table nil derived-mode-parent] 5) #@142 Major mode for xhg mq interaction. This mode runs the hook `xhg-mq-mode-hook', as the final step during initialization. \{xhg-mq-mode-map} (defalias 'xhg-mq-mode #[nil "\306\300!\210\307\310 \210\311\312\313 !\210\314\f!\210 \315 \210\316\317!\210)\320\321!\207" [delay-mode-hooks major-mode mode-name xhg-mq-mode-map xhg-mq-mode-syntax-table xhg-mq-mode-abbrev-table make-local-variable t kill-all-local-variables xhg-mq-mode "xhg mq mode" use-local-map set-syntax-table dvc-install-buffer-menu toggle-read-only 1 run-mode-hooks xhg-mq-mode-hook local-abbrev-table] 2 (#$ . 13606) nil]) (defalias 'xhg-mq-ewoc-data-at-point #[nil "\302 \303U\206\304 \305 =\206\306=??\205\307\310 !!\207" [major-mode xhg-mq-cookie dvc-line-number-at-pos 1 line-beginning-position line-end-position xhg-mq-mode ewoc-data ewoc-locate] 3]) #@52 Return the patch name at point in a xhg mq buffer. (defalias 'xhg-mq-patch-name-at-point #[nil "\300 @\207" [xhg-mq-ewoc-data-at-point] 1 (#$ . 14447)]) #@31 Edit the mq patch series file (defalias 'xhg-mq-edit-series-file #[nil "\300\301 \302P!\210\303\304!\207" [find-file-other-window dvc-tree-root "/.hg/patches/series" message "You can carefully reorder the patches in the series file. Comments starting with '#' and empty lines are allowed."] 3 (#$ . 14606) nil]) (defalias 'xhg-mq-next #[nil "`\301y\210\302 ?\205 b)\207" [pos 1 xhg-mq-ewoc-data-at-point] 1 nil nil]) (defalias 'xhg-mq-previous #[nil "`\301y\210\302 ?\205 b)\207" [pos -1 xhg-mq-ewoc-data-at-point] 1 nil nil]) (provide 'xhg-mq)