;ELC ;;; Compiled by mwolson@grepfind.mwolson.org on Thu Jan 24 00:15:30 2008 ;;; from file /stuff/proj/emacs/dvc/mwolson/lisp/dvc-gnus.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 "`dvc-gnus.el' was compiled for Emacs 19.29 or later")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (require 'tla-core) #@40 DVC Key mapping added to gnus summary. (defvar gnus-summary-dvc-submap nil (#$ . 614)) #@81 Initialize the keymap for DVC in `gnus-summary-mode-map'. Prefix key is 'K t'. (defalias 'dvc-gnus-initialize-keymap #[nil "?\205\302\303!\210\302\304!\210\302\305!\210\306 \307 \310#\207" [gnus-summary-dvc-submap gnus-summary-mode-map require gnus gnus-sum gnus-art make-sparse-keymap define-key [75 116]] 4 (#$ . 707)]) #@372 Insinuate Gnus for each registered DVC back-end. Runs (-insinuate-gnus) for each registered back-end having this function. Additionally the following key binding is defined for the gnus summary mode map: K t l `dvc-gnus-article-extract-log-message' K t v `dvc-gnus-article-view-patch' K t m `dvc-gnus-article-view-missing' K t a `dvc-gnus-article-apply-patch' (defalias 'dvc-insinuate-gnus #[nil "\302 \210\303\304\305#\210\303\306\307#\210\303\310\311#\210\303\312\313#\210\314\315 \"\207" [gnus-summary-dvc-submap dvc-registered-backends dvc-gnus-initialize-keymap define-key [97] dvc-gnus-article-apply-patch [108] dvc-gnus-article-extract-log-message [118] dvc-gnus-article-view-patch [109] dvc-gnus-article-view-missing mapcar #[(x) "\302\303\304#\305 !\205\306\307\"\210 )\207" [x fn dvc-function "insinuate-gnus" t fboundp dvc-trace "Insinuating Gnus for %S"] 4]] 4 (#$ . 1042) nil]) #@175 Parse the mail and extract the log information. Save it to `dvc-memorized-log-header', `dvc-memorized-patch-sender', `dvc-memorized-log-message' and `dvc-memorized-version'. (defalias 'dvc-gnus-article-extract-log-message #[nil "\306 \210\212eb\210\307\310\311\312#\206\307\313!\314 \315 \"\211+eb\210\316\317\311\312#\314 \2052\315 \"\2058\f+eb\210\307\320\311\312#\314 \205N\315 \"\205V+\321\311\211\203\265@eb\210\316@\311\312#\203\254\316\211A@)\311\312#\203\254eb\210\316@!T\316\211A@)!\210\322 S\315 \"\211\323\324 \"\210+A\211\204c+\325 \207" [start-pos end-pos log-header dvc-memorized-log-header sender dvc-memorized-patch-sender gnus-summary-select-article-buffer search-forward "[PATCH] " nil t "Subject: " line-end-position buffer-substring-no-properties re-search-forward "From: +" "[VERSION] " (("^<>" "^<>") ("^\\[\\[\\[" "^\\]\\]\\]")) line-beginning-position message "Extracted the patch log message from '%s'" gnus-article-show-summary version dvc-memorized-version delim-pair #1=#:--cl-dolist-temp-- x log-message dvc-memorized-log-message] 6 (#$ . 1961) nil]) #@556 Apply MIME part N, as patchset. When called with no prefix arg, set N := 2. DVC will try to figure out which VCS to use when applying the patch. First we check to see if it is a tla changeset created with DVC. If that is the case, `tla-gnus-apply-patch' is called. The next check is whether it is a patch suitable for xhg. In that case `xhg-gnus-article-import-patch' is called. Then we check to see whether the patch was prepared with git format-patch. If so, then call `xgit-gnus-article-apply-patch'. Otherwise `dvc-gnus-apply-patch' is called. (defalias 'dvc-gnus-article-apply-patch #[(n) "\204\304\305\211\306\213\210 \307=\203\310 !\202A \311=\203%\312 !\202A \313=\2031\314 !\202A \315=\203=\316\n!\202A\317 \320\"*\207" [current-prefix-arg n bzr-merge-or-pull-url patch-type 2 nil ((byte-code "\302 \210eb\210\303\304\305\306\307\211#P\310\307#\203\311\202_eb\210\303\312\310\307#\203)\313\202_eb\210\303\314\310\307#\204<\303\315\310\307#\203E\316\317\320!\202_eb\210\303\321\310\307#\203]\303\322\310\307#\203]\323\202_\324\310\207" [patch-type bzr-merge-or-pull-url gnus-summary-select-article-buffer re-search-forward "\\[VERSION\\] " tla-make-name-regexp 4 t nil tla "^changeset: +[0-9]+:[0-9a-f]+$" xhg "^New revision in \\(.+\\)$" "^Committed revision [0-9]+ to \\(.+\\)$" bzr-merge-or-pull match-string-no-properties 1 "^---$" "^diff --git" xgit dvc] 6)) tla tla-gnus-article-apply-patch xhg xhg-gnus-article-import-patch xgit xgit-gnus-article-apply-patch bzr-merge-or-pull bzr-merge-or-pull-from-url gnus-article-part-wrapper dvc-gnus-apply-patch] 3 (#$ . 3132) "p"]) #@351 Apply MIME part N, as patchset. When called with no prefix arg, set N := 2. First is checked, if it is a tla changeset created with DVC. If that is the case, `tla-gnus-apply-patch' is called. The next check is whether it is a patch suitable for xhg. In that case `xhg-gnus-article-import-patch' is called. Otherwise `dvc-gnus-apply-patch' is called. (defalias 'dvc-gnus-article-view-missing #[nil "\300\213\207" [((byte-code "\306 \210eb\210eb\210\307\310\311\312#\204\307\313\311\312#\205U\314\315!\316 \"A\211\211A@)\312\f\2038\317\320\321\f#! \205T\f\204G\322\320\323\"!\f\324\325\f#\210\326!),\207" [bzr-missing-url bzr-merge-or-pull-from-url-rules dest x path doit gnus-summary-select-article-buffer re-search-forward "^New revision in \\(.+\\)$" nil t "^Committed revision [0-9]+ to \\(.+\\)$" match-string-no-properties 1 assoc y-or-n-p format "Run missing from %s in %s? " dvc-read-directory-name "Run missing from %s in: " message "Running bzr missing from %s in %s" bzr-missing default-directory] 6))] 1 (#$ . 4765) nil]) #@242 View MIME part N, as patchset. When called with no prefix arg, set N := 2. First is checked, if it is a tla changeset created with DVC. If that is the case, `tla-gnus-article-view-patch' is called. Otherwise `dvc-gnus-view-patch' is called. (defalias 'dvc-gnus-article-view-patch #[(n) "\204\303\304\305\213\210\n\306=\203\307 !\202\310 \311\")\207" [current-prefix-arg n patch-type 2 nil ((byte-code "\301 \210eb\210\302\303\304\305\306\211#P\307\306#\204'eb\210\310\311\307\306#\203,\310\312\307\306#\203,\313\202.\314\307\207" [patch-type gnus-summary-select-article-buffer re-search-forward "\\[VERSION\\] " tla-make-name-regexp 4 t nil search-forward "Revision: " "Archive: " tla dvc] 6)) tla tla-gnus-article-view-patch gnus-article-part-wrapper dvc-gnus-view-patch] 3 (#$ . 5824) "p"]) (byte-code "\301B\302\301!\204\303\301\304\"\210\304\207" [current-load-list dvc-apply-patch-mapping default-boundp set-default nil] 3) #@88 Use `dvc-apply-patch-mapping' to suggest a directory where the patch sould be applied. (defalias 'dvc-gnus-suggest-apply-patch-directory #[nil "\300\213\207" [((byte-code "\304 \210\305\212eb\210\306\307\310\311#\2037 \2037\312 \211@@)!\2030 \211@A)@\310\211\202 A\211\204)\313 \210\314\n!*\207" [dvc-apply-patch-mapping m patch-directory x gnus-summary-select-article-buffer "~/" search-forward "text/x-patch; " nil t looking-at gnus-article-show-summary expand-file-name] 5))] 1 (#$ . 6778)]) #@42 Apply the patch corresponding to HANDLE. (defalias 'dvc-gnus-apply-patch #[(handle) "\306 \210\307\310!\311P\312 \313\314 \n\"\210\315\n!\210\316 \210\317 !\210\320\321!\210p\322 \210\323 \324\325!\211\2054\325K\326\216\325\327M\210\330\331\".\207" [patch-buff window-conf dvc-patch-name handle default-directory #1=#:--cl-letf-bound-- dvc-gnus-article-extract-log-message dvc-make-temp-name "dvc-patch" ".diff" current-window-configuration nil mm-save-part-to-file find-file dvc-diff-mode dvc-buffer-push-previous-window-config toggle-read-only 1 delete-other-windows dvc-gnus-suggest-apply-patch-directory fboundp ediff-get-default-file-name ((byte-code "\203 \302 M\210\202\303\302!\210\302\207" [#1# #2=#:--cl-letf-save-- ediff-get-default-file-name fmakunbound] 2)) #[nil "\207" [default-directory] 1] ediff-patch-file 2 #2#] 4 (#$ . 7294)]) #@41 View the patch corresponding to HANDLE. (defalias 'dvc-gnus-view-patch #[(handle) "\305\306!\307Pp\310 \311\312\f \"\210\313 \210\314 \210\315 !\210\316 \210\317 !\210\320\321!\210\322\323!\210\324 ,\207" [patch-buff window-conf cur-buf dvc-patch-name handle dvc-make-temp-name "dvc-patch" ".diff" current-window-configuration nil mm-save-part-to-file gnus-summary-select-article-buffer split-window-vertically find-file-other-window dvc-diff-mode dvc-buffer-push-previous-window-config toggle-read-only 1 other-window -1 gnus-article-show-summary] 4 (#$ . 8163)]) (provide 'dvc-gnus)