CVS update by didierv packages/xemacs-packages/xemacs-devel/texi,
patcher.texi ...
xemacs-cvs at xemacs.org
xemacs-cvs at xemacs.org
Wed Feb 27 12:59:14 EST 2008
User: didierv
Date: 08/02/27 18:59:14
Modified: packages/xemacs-packages/xemacs-devel/texi ChangeLog
patcher.texi
Log:
Patcher 3.10
Revision Changes Path
1.114 +26 -1 XEmacs/packages/xemacs-packages/xemacs-devel/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/xemacs-devel/ChangeLog,v
retrieving revision 1.113
retrieving revision 1.114
diff -u -p -r1.113 -r1.114
--- ChangeLog 2007/12/31 10:04:08 1.113
+++ ChangeLog 2008/02/27 17:59:10 1.114
@@ -1,3 +1,28 @@
+2008-02-27 Didier Verna <didier at xemacs.org>
+
+ Patcher 3.10 is released.
+
+ * patcher.el (patcher-themes-option): Fix variables naming so that
+ the error message display the name of a missing theme.
+ * patcher.el (patcher-built-in-themes): Added -ws counterparts for
+ themes other than the Mercurial ones.
+ * patcher.el (patcher-logmsg-insert-change-logs): Don't remove
+ trailing newlines here.
+ * patcher.el (patcher-logmsg-commit): Ensure that the buffer ends
+ with one and only one newline character. If it is used as a
+ string, don't include the final newline in that string.
+ * patcher.el: Declare 'message-signature-separator boundp.
+ * patcher.el (patcher-built-in-themes): Add mercurial and
+ mercurial-ws themes.
+ * patcher.el (patcher-hg-diff-convert): New.
+ * patcher.el (patcher-built-in-themes): Provide built-in themes
+ for PRCS, CVS, SVN and Darcs.
+ * patcher.el (patcher-built-in-themes): New.
+ * patcher.el (patcher-themes): New defsubst to concat user-defined
+ and built-in themes.
+ * patcher.el (patcher-themes-option): Use it.
+ * patcher.el (patcher-default-themes): Update docstring.
+
2007-12-31 Norbert Koch <viteno at xemacs.org>
* Makefile (VERSION): XEmacs package 1.77 released.
@@ -5,7 +30,7 @@
2007-12-30 Aidan Kehoe <kehoea at parhasard.net>
* find-func.el (find-function-C-source):
- Accept built-in macros in this function.
+ Accept built-in macros in this function.
2007-09-17 Norbert Koch <viteno at xemacs.org>
1.25 +120 -29 XEmacs/packages/xemacs-packages/xemacs-devel/patcher.el
Index: patcher.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/xemacs-devel/patcher.el,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -p -r1.24 -r1.25
--- patcher.el 2007/09/17 09:26:01 1.24
+++ patcher.el 2008/02/27 17:59:10 1.25
@@ -1,14 +1,15 @@
;;; patcher.el --- Utility for mailing patch information
-;; Copyright (C) 2007 Didier Verna.
-;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 Didier Verna.
+;; Copyright (C) 2008 Didier Verna
+;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007 Didier Verna
;; Author: Didier Verna <didier at xemacs.org>
;; Maintainer: Didier Verna <didier at xemacs.org>
;; Created: Tue Sep 28 18:12:43 1999
-;; Last Revision: Mon Sep 17 09:45:22 2007
+;; Last Revision: Wed Feb 27 15:24:31 2008
;; Keywords: maint
+
;; This file is part of Patcher.
;; Patcher is free software; you can redistribute it and/or modify
@@ -41,7 +42,13 @@
;; Suggestions for further improvements:
-;; #### Implement a default theme for XEmacs developpers / committers.
+;; #### Add support for interactive RCSes (hmpf !). For instance, it would be
+;; neat to answer darcs questions interactively, and then construct the patch
+;; and the changelogs only for the selected patches.
+
+;; #### Add an "identity" project option (more than just the
+;; change-logs-user-[name|mail]. Some RCSes like hg may use it for commit
+;; information.
;; #### Investigate on the notion of adding new files (it's different across
;; RCSes).
@@ -168,8 +175,8 @@
;; Version management
;; ===========================================================================
-(defconst patcher-version "3.9"
- "Current version of Patcher")
+(defconst patcher-version "3.10"
+ "Current version of Patcher.")
;;;###autoload
(defun patcher-version ()
@@ -270,6 +277,9 @@
(setq pos (re-search-forward "^Subject: " nil t)))
(and pos (goto-char pos))))
+(patcher-globally-declare-boundp
+ '(message-signature-separator))
+
(defun patcher-goto-signature ()
;; Move point to the beginning of the mail signature (actually, in front of
;; the signature separator), if any. Otherwise, move point to the end of
@@ -694,8 +704,8 @@ See also the variable `patcher-default-k
(defcustom patcher-default-themes nil
"*Default themes to use in Patcher projects.
-This is a list of theme names (symbols) that must be defined in the
-`patcher-themes' user option."
+This is a list of theme names (symbols) that must be defined either
+in `patcher-themes' or `patcher-built-in-themes'."
:group 'patcher-default
;; #### NOTE: ideally, this type should be computed automatically, depending
;; #### on the defined themes. This arises the interesting question of
@@ -900,6 +910,9 @@ Each element looks like \(NAME :OPTION V
name (a symbol). The remainder of the list is the same as in project
descriptors (see `patcher-projects').
+Themes are searched for respectively in this variable and in
+`patcher-built-in-themes'.
+
See also `patcher-max-theme-depth'."
:group 'patcher-themes
:type `(repeat
@@ -912,8 +925,65 @@ See also `patcher-max-theme-depth'."
(repeat :inline t :tag "Options"
(choice :inline t :value (:mail-method compose-mail)
, at patcher-project-options-custom-type))
- ))
- )
+ )))
+
+(defconst patcher-built-in-themes
+ '((mercurial-ws
+:diff-command "hg diff -wbB %f"
+:change-logs-diff-command "hg extdiff -o -wbBtU0 %f"
+:themes (mercurial))
+ (mercurial
+:diff-command "hg diff %f"
+:change-logs-diff-command "hg extdiff -o -U0 %f"
+:commit-command "hg commit --logfile %s %f"
+:after-diff-hook (patcher-hg-diff-convert))
+ (darcs-ws
+:diff-command "darcs diff --diff-opts -uwbBt %f"
+:change-logs-diff-command "darcs diff --diff-opts -wbBtU0 %f"
+:themes (darcs))
+ (darcs
+:diff-command "darcs diff -u %f"
+:change-logs-diff-command "darcs diff --diff-opts -U0 %f"
+:commit-command "darcs record -a --logfile %s --delete-logfile %f"
+:after-diff-hook (patcher-darcs-diff-convert)
+:failed-command-regexp "^darcs failed:")
+ (svn-ws
+:diff-command "svn diff -x -uwb %f"
+:change-logs-diff-command
+ "svn diff --diff-cmd /usr/bin/diff -x -wbBtU0 %f"
+:themes (svn))
+ (svn
+:diff-command "svn diff -x -u %f"
+:change-logs-diff-command "svn diff --diff-cmd /usr/bin/diff -x -U0 %f"
+:commit-command "svn commit -F %s %f")
+ (cvs-ws
+:diff-command "cvs -q diff -uwbBt %f"
+:change-logs-diff-command "cvs -q diff -wbBtU0 %f"
+:themes (cvs))
+ (cvs
+:diff-command "cvs -q diff -u %f"
+:diff-line-filter "\\? .*"
+:change-logs-diff-command "cvs -q diff -U0 %f"
+:commit-command "cvs commit -F %s %f"
+:failed-command-regexp "^cvs \\[[^]]* aborted\\]")
+ (prcs-ws
+:diff-command "prcs diff -f -P %n %f -- -uwbBt"
+:change-logs-diff-command "prcs diff -f -P %n %f -- -wbBtU0"
+:themes (prcs))
+ (prcs
+:diff-command "prcs diff -f -P %n %f -- -u"
+:change-logs-diff-command "prcs diff -f -P %n %f -- -U 0"
+:commit-command "prcs checkin -f --version-log=%S %n %f"
+:after-diff-hook (patcher-prcs-diff-convert)
+:failed-command-regexp "^prcs: Command failed."))
+ "List of predefined themes.
+
+You can add new ones or override these ones in `patcher-themes'.")
+
+(defsubst patcher-themes ()
+ ;; Return the concatenation of user defined and built-in themes.
+ (append patcher-themes patcher-built-in-themes))
+
(defgroup patcher-projects nil
@@ -1021,14 +1091,14 @@ settings of Patcher themes (as themes ca
:group 'patcher-themes
:type 'integer)
-(defun patcher-themes-option (themes option level)
+(defun patcher-themes-option (theme-names option level)
;; Look for an option in a list of themes. Note that themes can have the
;; :themes option set. The themes tree (it shouldn't be a graph) is
;; traversed in depth first.
- (let (theme value)
- (while (and (not value) (setq theme (pop themes)))
- (setq theme (assoc theme patcher-themes))
- (or theme (patcher-error "`%s': no such theme" theme))
+ (let (theme-name theme value)
+ (while (and (not value) (setq theme-name (pop theme-names)))
+ (setq theme (assoc theme-name (patcher-themes)))
+ (or theme (patcher-error "`%s': no such theme" theme-name))
(let ((theme-options (cdr theme)))
(setq value (member option theme-options))
(unless value
@@ -1449,13 +1519,7 @@ option."
"\n\n"))
(insert (extent-string
;; #### NOTE: there is an empty line at the end of this extent.
- (patcher-change-log-extent change-log patcher-mail-buffer))))
- )
- ;; -2 is because 1/ there's a spurious empty line inserted after the last
- ;; element, and 2/ because we don't want automatic newlines at the end of
- ;; the buffer, in case log messages are used as strings (for instance with
- ;; PRCS).
- (delete-char -2))
+ (patcher-change-log-extent change-log patcher-mail-buffer))))))
(defun patcher-logmsg-insert-compressed-change-logs ()
"Insert compressed ChangeLog entries in the current Patcher LogMsg buffer."
@@ -1464,8 +1528,7 @@ option."
(patcher-logmsg-insert-change-logs)
(narrow-to-region beg (point))
(patcher-logmsg-compress-change-logs)
- (widen)
- ))
+ (widen)))
;; #### NOTE: This should be defined in the Mail Buffer section, but defining
@@ -1495,14 +1558,29 @@ When called interactively, use a prefix
(and arg (setq patcher-logmsg-commit-command
(read-shell-command "Commit command: "
patcher-logmsg-commit-command)))
+ ;; Make sure that the log buffer ends with one and only one newline
+ ;; character. Empty lines are useless, and I've noticed a bug in Darcs
+ ;; which makes it append the interactive ***END OF DESCRIPTION*** stuff to
+ ;; the log file contents, when it doesn't end with a newline character.
+ ;; Also, note that if the log message is put directly on the command line
+ ;; and not extracted from a file, we take care of removing the final
+ ;; newline.
+ (save-excursion
+ (goto-char (point-max))
+ (cond ((looking-at "\\'")
+ (skip-chars-backward "\n")
+ (delete-region (point) (1- (point-max))))
+ (t
+ (insert "\n"))))
(let* ((command
(patcher-command
patcher-project
(replace-in-string
(let (case-fold-search)
- (replace-in-string patcher-logmsg-commit-command
- "%S" (shell-quote-argument
- (buffer-substring)) t))
+ (replace-in-string
+ patcher-logmsg-commit-command
+ "%S" (shell-quote-argument
+ (buffer-substring nil (1- (point-max)))) t))
"%s" patcher-logmsg-file-name t)
(when sources
(append (mapcar #'patcher-file-relative-name change-logs)
@@ -1905,7 +1983,7 @@ doing.
This function removes the PRCS repository-specific path in front of
filenames to turn the output into a standard diff output.
This function is meant to be used as part of the :after-diff-hook
-project option"
+project option."
(goto-char (or beg (point-min)))
(while (re-search-forward "^\\(Index:\\|---\\|\\+\+\\+\\) " end t)
(setq beg (point))
@@ -1917,8 +1995,21 @@ project option"
"Patcher post-processor for Darcs diffs.
This function removes the Darcs repository-specific path in front of
filenames to turn the output into a standard diff output.
+This function is meant to be used as part of the :after-diff-hook
+project option."
+ (goto-char (or beg (point-min)))
+ (while (re-search-forward "^\\(---\\|\\+\+\\+\\) " end t)
+ (setq beg (point))
+ (skip-chars-forward "^/")
+ (forward-char 1)
+ (delete-region beg (point))))
+
+(defun patcher-hg-diff-convert (&optional beg end)
+ "Patcher post-processor for Mercurial diffs.
+This function removes the Mercurial repository-specific path in front of
+filenames to turn the output into a standard diff output.
This function is meant to be used as part of the :after-diff-hook
-project option"
+project option."
(goto-char (or beg (point-min)))
(while (re-search-forward "^\\(---\\|\\+\+\\+\\) " end t)
(setq beg (point))
1.15 +9 -0 XEmacs/packages/xemacs-packages/xemacs-devel/texi/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/xemacs-devel/texi/ChangeLog,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -p -r1.14 -r1.15
--- ChangeLog 2007/09/17 09:26:06 1.14
+++ ChangeLog 2008/02/27 17:59:13 1.15
@@ -1,3 +1,12 @@
+2008-02-27 Didier Verna <didier at xemacs.org>
+
+ Patcher 3.10 is released.
+
+ * patcher.texi (After Diff Hook): Document
+ patcher-hg-diff-convert; fix spelling of the others.
+ * patcher.texi (Themes): Document built-in themes.
+ * patcher.texi (XEmacs Devel): New chapter.
+
2007-09-17 Didier Verna <didier at lrde.epita.fr>
Patcher 3.9 is released.
1.15 +81 -23 XEmacs/packages/xemacs-packages/xemacs-devel/texi/patcher.texi
Index: patcher.texi
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/xemacs-devel/texi/patcher.texi,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -p -r1.14 -r1.15
--- patcher.texi 2007/09/17 09:26:05 1.14
+++ patcher.texi 2008/02/27 17:59:13 1.15
@@ -2,12 +2,12 @@
@c patcher.texi --- Patcher documentation
- at c Copyright (C) 2002, 2003, 2004, 2007 Didier Verna.
+ at c Copyright (C) 2002, 2003, 2004, 2007, 2008 Didier Verna.
@c Author: Didier Verna <didier at xemacs.org>
@c Maintainer: Didier Verna <didier at xemacs.org>
- at c Created: Sun Apr 21 21:34:06 2002 under XEmacs 21.5
- at c Last Revision: Mon Sep 17 09:51:41 2007
+ at c Created: Sun Apr 21 21:34:06 2002
+ at c Last Revision: Wed Feb 27 18:21:58 2008
@c This file is part of Patcher.
@@ -27,14 +27,9 @@
@c Commentary:
- at c Contents management by FCM version 0.1-b2.
+ at c Contents management by FCM version 0.1.
- at c #### TODO:
- at c - Add a section on how to setup Patcher for PRCS.
- at c Or better yet: provide default themes from which people would get
- at c inspiration.
-
@c %** start of header
@setfilename patcher.info
@settitle Patcher
@@ -50,8 +45,8 @@
@c ====================================================================
@c Definitions
@c ====================================================================
- at set VERSION 3.9
- at set COPYRIGHT_DATE 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007
+ at set VERSION 3.10
+ at set COPYRIGHT_DATE 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008
@c ====================================================================
@@ -143,6 +138,7 @@ This info file documents Patcher version
* Installation:: How to get and install Patcher
* Quick Start:: For the brave and the impatient
* User Manual:: A step-by-step guide to using Patcher
+* XEmacs Devel:: How to setup Patcher for XEmacs Development
* Variables Index::
* Functions Index::
* Keystrokes Index::
@@ -270,7 +266,7 @@ I also provide Patcher as a standalone p
personal usage (when developing and debugging new versions) but you
might want to use it if you're not interested in the rest of
@file{xemacs-devel}. The standalone version of Patcher can be found at
- at uref{http://www.lrde.epita.fr/~didier/comp/development/software.php}.
+ at uref{http://www.lrde.epita.fr/~didier/software/xemacs.php}.
You will also find different inlined versions of this documentation at
that place. For installation instructions, please read the
@file{INSTALL} file.
@@ -544,7 +540,7 @@ how to use and customize Patcher, please
@c ====================================================================
@c User Manual
@c ====================================================================
- at node User Manual, Variables Index, Quick Start, Top
+ at node User Manual, XEmacs Devel, Quick Start, Top
@comment node-name, next, previous, up
@chapter User Manual
@@ -641,6 +637,22 @@ infinite loop (a cycle in a theme graph)
@code{patcher-max-theme-depth} user option is provided. It represents
the expected maximum theme nesting level, and defaults to 8.
+ at vindex patcher-built-in-themes
+As of version 3.10, Patcher comes with a set of built-in themes for
+several revision control systems. These are PRCS, CVS, Subversion,
+Darcs and Mercurial. Look at the value of
+ at code{patcher-built-in-themes} to see what's in them. Each of these
+themes have a @code{-ws} counterpart which eliminates white-space
+differences in diff outputs. This comes in handy if you perform some
+kind of automatic white-space cleanup in the files you edit, especially
+when you let Patcher generate the ChangeLog entries.
+
+While you can't modify the value of @code{patcher-built-in-themes},
+you're free to do whatever you want in @code{patcher-themes},
+including creating a theme with the same name as a built-in one. This
+new theme will take precedence over the other. Having this built-in
+variable (a constant, actually) lets me modify its value from release
+to release without risking to smash your own adjustments.
@node Project inheritance, Fallbacks, Themes, Project Descriptors
@comment node-name, next, previous, up
@@ -1101,15 +1113,13 @@ originally placed at the beginning of th
excursion is saved for you.
@findex patcher-prcs-diff-convert
-Note: Patcher provides a special function named
- at code{patcher-prcs-diff-convert} that can be used in this hook in order
-to convert PRCS diff output to a traditional one.
-
- at findex patcher-prcs-darcs-convert
-Note: Patcher provides a special function named
- at code{patcher-prcs-darcs-convert} that can be used in this hook in order
-to convert Darcs diff output to a traditional one.
-
+ at findex patcher-darcs-diff-convert
+ at findex patcher-hg-diff-convert
+Note: Patcher currently provides 3 special functions named
+ at code{patcher-prcs-diff-convert}, @code{patcher-darcs-diff-convert}
+and @code{patcher-hg-diff-convert} that can be used in this hook in
+order to convert PRCS, Darcs and Mercurial diff output to a
+traditional one.
@node Diff Line Filter, Patch Restriction, After Diff Hook, Patch Generation
@comment node-name, next, previous, up
@@ -1977,9 +1987,57 @@ the command directory properly.
@c ====================================================================
+ at c XEmacs Devel
+ at c ====================================================================
+ at node XEmacs Devel, Variables Index, User Manual, Top
+ at comment node-name, next, previous, up
+ at chapter XEmacs Development
+
+Here is some specific information on how to setup Patcher for XEmacs
+developers. This assumes you're a committer to the mercurial
+repository of the 21.5 branch.
+
+The way I do it, I have a directory named
+ at code{/usr/local/src/xemacs-21.5} which is a clone of the Debian
+Mercurial repository. Let's call it the @emph{local trunk}. I have set
+the proper @code{default} and @code{default-push} options in
+ at code{/usr/local/src/xemacs-21.5/.hg/hgrc} so that I can push, pull,
+fetch or whatever without any argument on the command line. I also
+have set the @code{username} option to my XEmacs identity (that's
+mainly for the commit log messages).
+
+When I work on a new feature, I do it in a directory named
+ at code{/usr/local/src/xemacs-21.5-new-feature}, in which I commit
+regularly and occasionally merge with the main repository to keep up
+to date. When I'm satisfied with the feature, it's time to integrate
+it, but I don't want to import my whole personal history; so I just
+apply the final diff to my local trunk (which @emph{must} be up to
+date), commit locally with Patcher and then pull it up by hand.
+
+Under those conditions, the Patcher setup is quite simple:
+
+ at itemize @bullet
+ at item
+Use the @code{mercurial} or @code{mercurial-ws} built-in theme.
+ at item
+Use the @code{fake} mail method, because messages are now sent to
+ at code{xemacs-patches} automatically.
+ at item
+Put @code{subject} in the @code{:log-message-items} project options.
+This will serve as the summary line, and then you can put whatever
+longer description you want on the lines below it.
+ at end itemize
+
+That's it. Patcher generates the ChangeLog entries and performs the
+local commit. I just finish by pulling by hand. Maybe Patcher could
+also do that for me one day...
+
+
+
+ at c ====================================================================
@c Variables Index
@c ====================================================================
- at node Variables Index, Functions Index, User Manual, Top
+ at node Variables Index, Functions Index, XEmacs Devel, Top
@comment node-name, next, previous, up
@unnumbered Variables Index
@printindex vr
More information about the XEmacs-CVS
mailing list