Commits

Anonymous committed a127b8e

Patcher 3.9 is released

  • Participants
  • Parent commits 116a7d6

Comments (0)

Files changed (4)

+2007-09-17  Didier Verna  <didier@lrde.epita.fr>
+
+	Patcher 3.9 is released.
+
+	* patcher.el (patcher-darcs-diff-convert): New.
+	* patcher.el (patcher-generate-change-logs): Make
+	:change-logs-user-[name|mail] default to :user-[name|mail].
+
 2006-08-14  Norbert Koch  <viteno@xemacs.org>
 
 	* Makefile (VERSION): XEmacs package 1.75 released.
 	* find-func.el (find-function-C-source):
 	Change the regexp for a subr definition to also accept
 	DEFUN_NORETURN, DEFUN_MANY and the other alternatives available in
-	lisp.h. 
-	
+	lisp.h.
+
 2006-07-11  Norbert Koch  <viteno@xemacs.org>
 
 	* Makefile (VERSION): XEmacs package 1.74 released.
 	Prefer source-directory to source-root, check that the
 	corresponding variables exist before using them--fixes an error on
 	21.4.
-	
+
 2006-07-10  Norbert Koch  <viteno@xemacs.org>
 
 	* Makefile (VERSION): XEmacs package 1.73 released.
 
 	* ielm.el (ielm-eval-input): Change `:', `::', `:::' to `!'...,
 	since the `:' is special syntax now for keyword variables.
- 	(several other occurances also changed.) I chose !, because shells
+	(several other occurances also changed.) I chose !, because shells
 	use that character for history expansion.
 	(ielm-eval-input): Check that `ielm-string' is not null.
- 	Integrated reversed patch from Gregory Neil Shapiro
+	Integrated reversed patch from Gregory Neil Shapiro
 	<gshapiro@sendmail.org>.
 
 1998-08-15  SL Baur  <steve@altair.xemacs.org>
 ;;; patcher.el --- Utility for mailing patch information
 
-;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Didier Verna.
-
-;; PRCS: $Id$
+;; Copyright (C) 2007 Didier Verna.
+;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 Didier Verna.
 
 ;; Author:        Didier Verna <didier@xemacs.org>
 ;; Maintainer:    Didier Verna <didier@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.
 ;; 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 ()
 If not defined, `user-full-name' is used."
   :group 'patcher-default
   :type  '(choice (const :tag "user-full-name" nil)
-	          string))
+		  string))
 
 (defcustom patcher-default-user-mail nil
   "*Default user mail address to use when sending a Patcher mail.
 If not defined, `user-mail-address' is used."
   :group 'patcher-default
   :type '(choice (const :tag "user-mail-address" nil)
-	          string))
+		  string))
 
 (defcustom patcher-default-to-address "xemacs-patches@xemacs.org"
   "*Default To: header value to use when sending a Patcher mail.
 defined, it is prompted for."
   :group 'patcher-default
   :type  '(choice (const :tag "Ask" nil)
-	          string))
+		  string))
 
 (defcustom patcher-default-subject-prefix "[PATCH]"
   "*Default prefix for the subject of Patcher mails.
 	  :format "%{%t%}: %v"
 	  (const  :tag "" :value :user-mail)
 	  (choice (const :tag "user-mail-address" nil)
-	          string))
+		  string))
     (list :inline t :tag "To address"
 	  :format "%{%t%}: %v"
 	  (const  :tag "" :value :to-address)
 	  (narrow-to-region (or min (point-min)) (or max (point-max)))
 	  (patch-to-change-log
 	   default-directory
-	   :my-name (patcher-project-option patcher-project
-					    :change-logs-user-name)
-	   :my-email (patcher-project-option patcher-project
-					     :change-logs-user-mail)
+	   :my-name (or (patcher-project-option patcher-project
+			  :change-logs-user-name)
+			(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))
+		  :kill-source-files-after-diffing))
 	   :extent-property 'patcher
 	   :extent-property-value mailbuf)))
       ;; patch-to-change-log has the unfortunate side effect of burying all
     (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
   ;; #### buffers.
   (with-current-buffer buffer
     (let ((after-diff-hook (patcher-project-option patcher-project
-			    :after-diff-hook)))
+			     :after-diff-hook)))
       (when after-diff-hook
 	(patcher-with-progression "Running after diff hooks"
 	  (save-excursion
 - nil:     start Gnus in the current frame,
 - t:       start Gnus in a new frame,
 - 'follow: start Gnus in a new frame, and also use this frame to prepare
-           the new Patcher message."
+	   the new Patcher message."
   :group 'patcher-mail
   :type '(radio (const :tag "Use current frame" nil)
 		(const :tag "Create new frame" t)

File texi/ChangeLog

+2007-09-17  Didier Verna  <didier@lrde.epita.fr>
+
+	Patcher 3.9 is released.
+
+	* patcher.texi (After Diff Hook): Describe
+	`patcher-darcs-diff-convert'.
+	* patcher.texi (ChangeLogs Updating): Update description of
+	user-name and user-mail behavior.
+
 2005-07-26  Didier Verna  <didier@xemacs.org>
 
 	* Patcher 3.8 is released.

File texi/patcher.texi

 
 @c patcher.texi --- Patcher documentation
 
-@c Copyright (C) 2002, 2003, 2004 Didier Verna.
+@c Copyright (C) 2002, 2003, 2004, 2007 Didier Verna.
 
-@c PRCS: $Id$
-
-@c Author:        Didier Verna <didier@lrde.epita.fr>
-@c Maintainer:    Didier Verna <didier@lrde.epita.fr>
-@c Created:       Sun Apr 21 21:34:06 2002 under XEmacs 21.5 (beta 1)
-@c Last Revision: Tue Aug 31 14:14:48 2004
+@c Author:        Didier Verna <didier@xemacs.org>
+@c Maintainer:    Didier Verna <didier@xemacs.org>
+@c Created:       Sun Apr 21 21:34:06 2002 under XEmacs 21.5
+@c Last Revision: Mon Sep 17 09:51:41 2007
 
 @c This file is part of Patcher.
 
 @c ====================================================================
 @c Definitions
 @c ====================================================================
-@set VERSION 3.8
-@set COPYRIGHT_DATE 1999, 2000, 2001, 2002, 2003, 2004, 2005
+@set VERSION 3.9
+@set COPYRIGHT_DATE 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007
 
 
 @c ====================================================================
 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
 (@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
 @code{patcher-prcs-diff-convert} that can be used in this hook in order
 to convert PRCS diff output to a traditional one.
 
+@findex patcher-prcs-darcs-convert
+Note: Patcher provides a special function named
+@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
 
 @vindex patcher-default-change-logs-user-name
 @vindex :change-logs-user-name
+@vindex patcher-default-user-name
+@vindex :user-name
 @vindex patcher-default-change-logs-user-mail
 @vindex :change-logs-user-mail
+@vindex patcher-default-user-mail
+@vindex :user-mail
 @findex patch-to-change-log
 @vindex user-full-name
 @vindex user-mail-address
 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).