Patcher 3.9 is released

Didier Verna didier at xemacs.org
Mon Sep 17 05:31:25 EDT 2007


       Hello,

I have just committed the next edition of Patcher, with two small
improvements:

* Version 3.9:
==============
** the :change-logs-user-[name|mail] options now default to :user-[name|mail]
** support for Darcs
through a built-in function patcher-darcs-diff-convert


Index: patcher.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/xemacs-devel/patcher.el,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -u -b -t -w -B -r1.23 -r1.24
--- patcher.el  26 Jul 2005 14:20:07 -0000      1.23
+++ patcher.el  17 Sep 2007 09:26:01 -0000      1.24
@@ -1,13 +1,12 @@
 ;;; patcher.el --- Utility for mailing patch information

-;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Didier Verna.
-
-;; PRCS: $Id: patcher.el 1.16.1.60.1.17 Tue, 26 Jul 2005 15:53:03 +0200 didier $
+;; Copyright (C) 2007 Didier Verna.
+;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 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: Tue Aug 31 14:14:48 2004
+;; Last Revision: Mon Sep 17 09:45:22 2007
 ;; Keywords:      maint

 ;; This file is part of Patcher.
@@ -169,26 +168,8 @@
 ;; Version management
 ;; ===========================================================================

-;; $Format: "(defconst patcher-prcs-major-version \"$ProjectMajorVersion$\")"$
-(defconst patcher-prcs-major-version "version-3-8")
-;; $Format: "(defconst patcher-prcs-minor-version \"$ProjectMinorVersion$\")"$
-(defconst patcher-prcs-minor-version "1")
-(defconst patcher-version
-  (let ((level patcher-prcs-minor-version)
-        major minor status)
-    (string-match "\\(branch\\|version\\)-\\([0-9]+\\)-\\([0-9]+\\)"
-                  patcher-prcs-major-version)
-    (setq major (match-string 2 patcher-prcs-major-version)
-          minor (match-string 3 patcher-prcs-major-version)
-          status (match-string 1 patcher-prcs-major-version))
-    (cond ((string= status "version")
-           (setq level (int-to-string (1- (string-to-int level))))
-           (if (string-equal level "0")
-               (concat major "." minor)
-             (concat major "." minor "." level)))
-          ((string= status "branch")
-           (concat major "." minor "-b" level)))
-    ))
+(defconst patcher-version "3.9"
+  "Current version of Patcher")

 ;;;###autoload
 (defun patcher-version ()
@@ -1793,10 +1774,14 @@
           (narrow-to-region (or min (point-min)) (or max (point-max)))
           (patch-to-change-log
            default-directory
-:my-name (patcher-project-option patcher-project
+:my-name (or (patcher-project-option patcher-project
                                             :change-logs-user-name)
-:my-email (patcher-project-option patcher-project
+                        (patcher-project-option patcher-project
+:user-name))
+:my-email (or (patcher-project-option patcher-project
                                              :change-logs-user-mail)
+                         (patcher-project-option patcher-project
+:user-mail))
            :keep-source-files
            (not (patcher-project-option patcher-project
                                         :kill-source-files-after-diffing))
@@ -1926,8 +1911,20 @@
     (setq beg (point))
     (skip-chars-forward "^/")
     (forward-char 1)
-    (delete-region beg (point)))
-  )
+    (delete-region beg (point))))
+
+(defun patcher-darcs-diff-convert (&optional beg end)
+  "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-run-after-diff-hook (buffer &optional beg end)
   ;; If any, call the after-diff hooks on BUFFER (auxiliary or mail


Index: texi/patcher.texi
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/xemacs-devel/texi/patcher.texi,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -u -b -t -w -B -r1.13 -r1.14
--- texi/patcher.texi   26 Jul 2005 14:20:11 -0000      1.13
+++ texi/patcher.texi   17 Sep 2007 09:26:05 -0000      1.14
@@ -2,14 +2,12 @@

 @c patcher.texi --- Patcher documentation

- at c Copyright (C) 2002, 2003, 2004 Didier Verna.
+ at c Copyright (C) 2002, 2003, 2004, 2007 Didier Verna.

- at c PRCS: $Id: patcher.texi 1.23.1.7 Tue, 26 Jul 2005 15:53:03 +0200 didier $
-
- at c Author:        Didier Verna <didier at lrde.epita.fr>
- at c Maintainer:    Didier Verna <didier at lrde.epita.fr>
- at c Created:       Sun Apr 21 21:34:06 2002 under XEmacs 21.5 (beta 1)
- at c Last Revision: Tue Aug 31 14:14:48 2004
+ at c Author:        Didier Verna <didier at xemacs.org>
+ at 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

 @c This file is part of Patcher.

@@ -52,8 +50,8 @@
 @c ====================================================================
 @c Definitions
 @c ====================================================================
- at set VERSION 3.8
- at set COPYRIGHT_DATE 1999, 2000, 2001, 2002, 2003, 2004, 2005
+ at set VERSION 3.9
+ at set COPYRIGHT_DATE 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007


 @c ====================================================================
@@ -188,11 +186,11 @@
 When a project becomes important in size, or when the development is
 performed cooperatively by several people across the Internet, it is a
 common practice to help maintaining it by using a development control
-system. Such tools (CVS, PRCS, to name a few) usually work by
-maintaining a centralized project archive (also called a repository)
-that keeps track of the history of the changes, lets you develop
-different ``branches'' at the same time and perform operations like
-merges between these different project branches.
+system. Such tools (CVS, SVN, PRCS, Darcs to name a few) usually work
+by maintaining a centralized project archive (also called a
+repository) that keeps track of the history of the changes, lets you
+develop different ``branches'' at the same time and perform operations
+like merges between these different project branches.

 In such ``archive-based'' maintenance models, making the project evolve
 usually involves repeatedly the same few steps, some of which can be
@@ -754,7 +752,7 @@
 (@code{To:} address, @code{From:} address, diff and commit commands and
 so on) because they both relate to XEmacs. On the other hand I have
 personal but totally unrelated projects that share the same commands
-because they are all handled through a local PRCS archive.
+because they are all handled through a common system: Darcs.

 In other words, you should rather use the inheritance mechanism when
 projects relate to each other, and the theme mechanism for settings that
@@ -1107,6 +1105,11 @@
 @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.
+

 @node Diff Line Filter, Patch Restriction, After Diff Hook, Patch Generation
 @comment  node-name,  next,  previous,  up
@@ -1333,8 +1336,12 @@

 @vindex patcher-default-change-logs-user-name
 @vindex :change-logs-user-name
+ at vindex patcher-default-user-name
+ at vindex:user-name
 @vindex patcher-default-change-logs-user-mail
 @vindex :change-logs-user-mail
+ at vindex patcher-default-user-mail
+ at vindex:user-mail
 @findex patch-to-change-log
 @vindex user-full-name
 @vindex user-mail-address
@@ -1342,7 +1349,9 @@
 other project options that give you some control on the created entries:
 @code{:change-logs-user-name} and @code{:change-logs-user-mail}. As you
 might expect, these are strings defining your name and mail address for
-ChangeLog entries'headers. When @code{nil}, Patcher lets the function
+ChangeLog entries'headers. When @code{nil}, Patcher falls back to
+(respectively) the @code{:user-name} and @code{:user-mail} project
+options. If in turn set to nil, Patcher lets the function
 @code{patch-to-change-log} decide what to use (most probably what the
 user options @code{user-full-name} and @code{user-mail-address} say).

-- 
New @-quartet featured CD Review !!
http://www.indie-music.com/modules.php?name=News&file=article&sid=6457

Didier Verna, didier at lrde.epita.fr, http://www.lrde.epita.fr/~didier

EPITA / LRDE, 14-16 rue Voltaire   Tel.+33 (1) 44 08 01 85
94276 Le Kremlin-Bicêtre, France   Fax.+33 (1) 53 14 59 22   didier at xemacs.org



More information about the XEmacs-Patches mailing list