emacs-wiki-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[emacs-wiki-discuss] Send and apply arch patches via gnus


From: Stefan Reichör
Subject: [emacs-wiki-discuss] Send and apply arch patches via gnus
Date: Thu, 03 Feb 2005 08:22:01 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux)

Hi!

Sometimes you don't want to setup an arch archive to provide a new
feature. Here is what I do to accomplish this for xtla:

I maintain the archive at home. I have a public mirror for it, so I
can access it from work also.
Sometimes I make some fixes at work that I want to apply to archive at
home. What I do no is: I send the patch via mail and apply it at home.

I have modified the function I use to send a patch to the
emacs-wiki-discuss list:

(defvar planner-package-root-directory nil)
(defun planner-submit-patch ()
  "Submit a patch to the emacs-wiki-discuss list.
With this feature it is not necessary to tag a planner archive.
You simply edit your checked out copy from Planner.el and call this function.
The function will create a patch as *.tar.gz file and prepare a mail that
you can send to the emacs wiki discuss list."
  (interactive)
  (tla-version)
  (tla-arch-version)
  (tla-prepare-patch-submission (tla-tree-root
                                 (file-name-directory (or 
planner-package-root-directory (locate-library "planner"))))
                                (concat "++planner-patch-" (format-time-string 
"%Y-%m-%d_%H-%M-%S" (current-time)))
                                "address@hidden"
                                tla-version
                                (concat
                                 "Please change the Subject header to a concise 
description of your patch.\n"
                                 "Please describe your patch between the 
LOG-START and LOG-END markers:\n"
                                 "<<LOG-START>>\n"
                                 "\n"
                                 "<<LOG-END>>\n"
                                 "\n"
                                 )))

So all you have to do as contributor is to 
* hack your checked out version of Planner.el
* call M-x planner-submit-patch
* Enter a description for your patch
* Send the message
* Undo the changes in your working copy (they are saved in the tarball)
* Wait until your patch is accepted ;-)
* Update from the main archive


It is also easy for the maintainer to apply your patch.
Here is what I have in my .emacs:

(tla-insinuate-gnus)
(setq tla-apply-patch-mapping
      '(((nil "xtla" nil  nil nil) "~/work/myprg/xtla")))

tla-insinuate-gnus installs the following new keybindings for the gnus summary:
K t v `tla-gnus-article-view-patch'
K t a `tla-gnus-article-apply-patch'
K t l `tla-gnus-article-extract-log-message'"

So you just hit K t a to apply the patch. The description of the patch
is saved and can be inserted with C-c C-p, when you commit via xtla.


As I have already mentioned, I use that way to transfer patches from
work to my archive at home.

Do you think, it is worth to add planner-submit-patch and
emacs-wiki-submit-patch to the planner and the emacs-wiki packages to
make it easier to contribute to that projects?

Stefan.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]