5 new commits in patcher:
https://bitbucket.org/xemacs/patcher/changeset/718671f4cd47/
changeset: 718671f4cd47
user: didierverna
date: 2012-01-03 17:38:13
summary: Ignore a committed project's ChangeLogs in patcher-kill-project.
When a project has been committed, we don't want to offer the user the
possibility to undo the ChangeLogs because that would leave them in an inconsistent state
with respect to the repository.
lisp/ChangeLog addition:
2012-01-03 Didier Verna <didier(a)xemacs.org>
* patcher-instance.el (patcher-kill-project): Don't prompt for
ChangeLog handling options if the project has been committed.
affected #: 1 file
diff -r 0667eac4a28e1032ec7a42442e8dddb60f444d44 -r
718671f4cd473b9786f5f99b5b3bc0d3c531cd9e lisp/patcher-instance.el
--- a/lisp/patcher-instance.el
+++ b/lisp/patcher-instance.el
@@ -551,8 +551,9 @@
(defun patcher-kill-project (project)
;; Abort PROJECT.
(when (yes-or-no-p "Really abort the project? ")
- (unless (eq (patcher-project-option project :change-logs-status)
- 'ephemeral)
+ (unless (or (eq (patcher-project-option project :change-logs-status)
+ 'ephemeral)
+ (patcher-project-committed-p project))
(with-fboundp '(patcher-generated-change-logs
patcher-ungenerate-change-logs)
(let ((change-log-buffers
https://bitbucket.org/xemacs/patcher/changeset/9ceabfefd6c8/
changeset: 9ceabfefd6c8
user: didierverna
date: 2012-01-12 22:10:26
summary: Use only one ChangeLog in the ephemeral case.
Since ephemeral ChangeLog entries are only used in commit messages, it is
important to root all files at the project's base directory.
../ChangeLog addition:
2012-01-12 Didier Verna <didier(a)xemacs.org>
* lisp/patcher-instance.el (patcher-project): Rename DIRECTORY
slot into BASE-DIRECTORY. This slot turned out to be unused
previously.
* lisp/patcher-instance.el (patcher-prompt-project): Set it.
* lisp/patcher-change-log.el (patcher-locate-change-log): Use it
to always return one ChangeLog file at the base directory for
ephemeral ChangeLog status.
affected #: 2 files
diff -r 718671f4cd473b9786f5f99b5b3bc0d3c531cd9e -r
9ceabfefd6c85113769556110abedf1ac4d17566 lisp/patcher-change-log.el
--- a/lisp/patcher-change-log.el
+++ b/lisp/patcher-change-log.el
@@ -6,7 +6,7 @@
;; Author: Didier Verna <didier(a)xemacs.org>
;; Maintainer: Didier Verna <didier(a)xemacs.org>
;; Created: Sat Feb 13 22:20:24 2010
-;; Last Revision: Sun Dec 4 21:30:13 2011
+;; Last Revision: Thu Jan 12 21:56:06 2012
;; Keywords: maint
@@ -70,27 +70,33 @@
(patcher-project-option project :change-log-file-name)))
;; Locate PROJECT's ChangeLog file for SOURCE.
;; SOURCE must be an absolute file name.
- ;; If PROJECT doesn't do ChangeLogs, return a ChangeLog file in SOURCE's
- ;; directory (symlinks followed). Otherwise, try to find a ChangeLog file
- ;; the usual way.
- (setq source (file-truename source)) ;; follow SOURCE symlinks
- (let* ((directory (file-name-directory source))
- (first-change-log (file-truename change-log-file-name directory)))
- (if (patcher-project-option project :change-logs-updating)
- (flet ((change-log-exists-p (change-log)
- (or (get-file-buffer change-log)
- (file-exists-p change-log))))
- (let ((change-log first-change-log))
- (while (and (not (change-log-exists-p change-log))
- (let ((parent (file-name-directory
- (directory-file-name directory))))
- (prog1 (not (string= parent directory))
- (setq directory parent))))
- (setq change-log (file-truename change-log-file-name directory)))
- (if (change-log-exists-p change-log)
- change-log
- first-change-log)))
- first-change-log)))
+ ;; If PROJECT does only ephemeral ChangeLogs, return always the same one,
+ ;; located at the base directory.
+ ;; If PROJECT doesn't have ChangeLogs yet, return a ChangeLog file in
+ ;; SOURCE's directory (symlinks followed). Otherwise, try to find a
+ ;; ChangeLog file the usual way.
+ (if (eq (patcher-project-option project :change-logs-status) 'ephemeral)
+ (expand-file-name change-log-file-name
+ (patcher-project-base-directory project))
+ (setq source (file-truename source)) ;; follow SOURCE symlinks
+ (let* ((directory (file-name-directory source))
+ (first-change-log (file-truename change-log-file-name directory)))
+ (if (patcher-project-option project :change-logs-updating)
+ (flet ((change-log-exists-p (change-log)
+ (or (get-file-buffer change-log)
+ (file-exists-p change-log))))
+ (let ((change-log first-change-log))
+ (while (and (not (change-log-exists-p change-log))
+ (let ((parent (file-name-directory
+ (directory-file-name directory))))
+ (prog1 (not (string= parent directory))
+ (setq directory parent))))
+ (setq change-log
+ (file-truename change-log-file-name directory)))
+ (if (change-log-exists-p change-log)
+ change-log
+ first-change-log)))
+ first-change-log))))
(put 'patcher-mapcar-change-log-extents 'lisp-indent-function 1)
(defmacro* patcher-mapcar-change-log-extents
@@ -190,8 +196,7 @@
(defun patcher-detect-ephemeral-change-logs (project)
;; Detect ephemeral ChangeLogs for PROJECT.
;; Throw an undiffable-change-logs when detected.
- (when (eq (patcher-project-option project :change-logs-status)
- 'ephemeral)
+ (when (eq (patcher-project-option project :change-logs-status) 'ephemeral)
(patcher-error 'undiffable-change-logs)))
@@ -490,8 +495,7 @@
(defun patcher-save-change-logs (project)
;; Save PROJECT's ChangeLog buffers (unless ephemeral).
- (unless (eq (patcher-project-option project :change-logs-status)
- 'ephemeral)
+ (unless (eq (patcher-project-option project :change-logs-status) 'ephemeral)
(patcher-save-buffers (patcher-change-log-buffers project))))
diff -r 718671f4cd473b9786f5f99b5b3bc0d3c531cd9e -r
9ceabfefd6c85113769556110abedf1ac4d17566 lisp/patcher-instance.el
--- a/lisp/patcher-instance.el
+++ b/lisp/patcher-instance.el
@@ -6,7 +6,7 @@
;; Author: Didier Verna <didier(a)xemacs.org>
;; Maintainer: Didier Verna <didier(a)xemacs.org>
;; Created: Sat Feb 13 22:43:33 2010
-;; Last Revision: Fri Dec 9 13:22:42 2011
+;; Last Revision: Thu Jan 12 22:04:43 2012
;; Keywords: maint
@@ -78,9 +78,10 @@
;; the ability to override the project's commit command by giving a prefix
;; to `patcher-logmsg-commit'.
commit-command
- ;; The project's directory. This variable is needed because a temporary
- ;; subproject may modify the original project's value for it.
- directory
+ ;; The project's base directory. This variable is used to anchor ephemeral
+ ;; ChangeLogs, and is needed because a subproject may modify the original
+ ;; project's value for it.
+ base-directory
;; The project's command directory. This variable is needed for supporting
;; relocatable projects.
command-directory
@@ -254,6 +255,7 @@
(when base-directory
(file-name-as-directory (expand-file-name ".." base-directory)))
base-directory t nil patcher-directory-history))
+
;; Check that the relocation is valid: we need both a valid subdirectory
;; and command (super) directory.
(when subdirectory
@@ -265,6 +267,7 @@
base-directory))
(patcher-error "Unable to relocate command directory %s under %s"
command-directory base-directory))))
+ (setf (patcher-project-base-directory project) base-directory)
;; Compute the default working directory (that is, before a potential
;; override) and the actual one which may be overridden.
@@ -282,7 +285,6 @@
default-working-directory
t))
default-working-directory))
- (setf (patcher-project-directory project) working-directory)
;; #### WARNING: this filtering is very complicated to do because of the
;; possibility to use wildcards. The code below doesn't really work so for
https://bitbucket.org/xemacs/patcher/changeset/73b9efe2a461/
changeset: 73b9efe2a461
user: didierverna
date: 2012-01-12 22:23:30
summary: New theme 'ephemeral-change-logs.
This theme not only sets the ChangeLogs status but also changes the prologue
to avoid using the file name.
ChangeLog entries:
2012-01-12 Didier Verna <didier(a)xemacs.org>
* lisp/patcher.el (patcher-built-in-themes): New theme
'ephemeral-change-logs. Set the ChangeLogs status to 'ephemeral
and the ChangeLogs prologue to "ChangeLog entries:".
affected #: 1 file
diff -r 9ceabfefd6c85113769556110abedf1ac4d17566 -r
73b9efe2a4610efcc5c35ae597b1d00cc12481e6 lisp/patcher.el
--- a/lisp/patcher.el
+++ b/lisp/patcher.el
@@ -6,7 +6,7 @@
;; Author: Didier Verna <didier(a)xemacs.org>
;; Maintainer: Didier Verna <didier(a)xemacs.org>
;; Created: Tue Sep 28 18:12:43 1999
-;; Last Revision: Sun Dec 11 13:55:27 2011
+;; Last Revision: Thu Jan 12 22:17:28 2012
;; Keywords: maint
@@ -316,7 +316,10 @@
(ws
:committed-notice "\
NOTE: This patch has been committed. The version below is informational only.
-In particular, whitespace difference have been removed.")))
+In particular, whitespace difference have been removed.")
+ (ephemeral-change-logs
+ :change-logs-status ephemeral
+ :change-logs-prologue "ChangeLog entries:")))
(provide 'patcher)
https://bitbucket.org/xemacs/patcher/changeset/7cd7bf97a948/
changeset: 7cd7bf97a948
user: didierverna
date: 2012-01-13 09:00:56
summary: Update manual's copyright macros.
ChangeLog entries:
2012-01-13 Didier Verna <didier(a)xemacs.org>
* doc/patcher.texi (COPYRIGHT_DATE): Remove variable.
* doc/patcher.texi (copyrightdate): New replacement macro.
affected #: 1 file
diff -r 73b9efe2a4610efcc5c35ae597b1d00cc12481e6 -r
7cd7bf97a94854f9deb0a3f2c9c87847865a8b14 doc/patcher.texi
--- a/doc/patcher.texi
+++ b/doc/patcher.texi
@@ -2,12 +2,13 @@
@c patcher.texi --- Patcher documentation
+@c Copyright (C) 2012 Didier Verna.
@c Copyright (C) 2002, 2003, 2004, 2007, 2008, 2009, 2010, 2011 Didier Verna.
@c Author: Didier Verna <didier(a)xemacs.org>
@c Maintainer: Didier Verna <didier(a)xemacs.org>
@c Created: Sun Apr 21 21:34:06 2002
-@c Last Revision: Sun Dec 18 18:03:24 2011
+@c Last Revision: Fri Jan 13 08:58:37 2012
@c This file is part of Patcher.
@@ -46,7 +47,12 @@
@c Definitions
@c ====================================================================
@set VERSION 4.0 pre 1
-@set COPYRIGHT_DATE 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010,
2011
+@macro copyrightdate
+Copyright @copyright{} 2010, 2011, 2012 Didier Verna.@*
+Copyright @copyright{} 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, @c
+2008, 2009 Didier Verna.
+@end macro
+
@c ====================================================================
@@ -57,7 +63,7 @@
@value{VERSION}, an XEmacs package for automating the maintenance of
RCS-based projects.
-Copyright @copyright{} @value{COPYRIGHT_DATE} Didier Verna.
+@copyrightdate{}
Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are
@@ -95,7 +101,7 @@
@author Didier Verna <@email{didier@(a)xemacs.org}>
@page
@vskip 0pt plus 1filll
-Copyright @copyright{} @value{COPYRIGHT_DATE} Didier Verna.
+@copyrightdate{}
Permission is granted to make and distribute verbatim copies of this
https://bitbucket.org/xemacs/patcher/changeset/ce7a0dc0b627/
changeset: ce7a0dc0b627
user: didierverna
date: 2012-01-13 09:37:58
summary: Update documentation on ephemeral ChangeLogs.
ChangeLog entries:
2012-01-13 Didier Verna <didier(a)xemacs.org>
* doc/patcher.texi (ChangeLogs Status): Document the
'ephemeral-change-logs built-in themes. Reflect the fact that
there's now only one ephemeral ChangeLog file located at the
project's base directory.
affected #: 1 file
diff -r 7cd7bf97a94854f9deb0a3f2c9c87847865a8b14 -r
ce7a0dc0b627e6e53f62cb5d715c52facca1c194 doc/patcher.texi
--- a/doc/patcher.texi
+++ b/doc/patcher.texi
@@ -8,7 +8,7 @@
@c Author: Didier Verna <didier(a)xemacs.org>
@c Maintainer: Didier Verna <didier(a)xemacs.org>
@c Created: Sun Apr 21 21:34:06 2002
-@c Last Revision: Fri Jan 13 08:58:37 2012
+@c Last Revision: Fri Jan 13 09:35:26 2012
@c This file is part of Patcher.
@@ -47,12 +47,17 @@
@c Definitions
@c ====================================================================
@set VERSION 4.0 pre 1
+
@macro copyrightdate
Copyright @copyright{} 2010, 2011, 2012 Didier Verna.@*
Copyright @copyright{} 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, @c
2008, 2009 Didier Verna.
@end macro
+@macro etc
+(a)i{etc.}
+@end macro
+
@c ====================================================================
@@ -563,8 +568,8 @@
@findex patcher-version
@kindex C-c C-p v
At any time, and in any buffer related to a Patcher project (mail,
-ChangeLog etc.), you can query the current version of Patcher by calling
-the function @code{patcher-version}, bound to @kbd{C-c C-p v}.
+ChangeLog @etc{}), you can query the current version of Patcher by
+calling the function @code{patcher-version}, bound to @kbd{C-c C-p v}.
@menu
* Starting Up:: Patcher entry points
@@ -1983,20 +1988,29 @@
@vindex :change-log-file-name
A value of @code{ephemeral} on the other hand means that your ChangeLog
entries exist only temporarily, to be used in the commit log message
-and/or inserted verbatim in the mail. Patcher does this by creating
-temporary ChangeLog files (named after the @code{:change-log-file-name}
-project option) and getting rid of them after the mail is sent. As a
-result, everything works just as if the ChangeLog files were real:
-ChangeLog entries can be generated automatically or written manually,
-you can navigate through them on a per-directory basis, whatever.
-
-The only restriction is that you cannot diff them because they are not
-really part of the project, so their appearance can only be
-@code{verbatim}. Also, when you set a project to ephemeral ChangeLogs,
-beware to use ChangeLog file names that don't conflict with existing
-files (old ChangeLog files may for example be renamed
+and/or inserted verbatim in the mail. Patcher does this by creating a
+temporary ChangeLog file (named after the @code{:change-log-file-name}
+project option) in the project's base directory, and getting rid of it
+after the mail is sent. As a result, everything works just as if the
+ChangeLog file was real: ChangeLog entries can be generated
+automatically or written manually @etc{}
+
+The only restriction is that you cannot diff the ephemeral ChangeLog
+entries because they are not really part of the project, so their
+appearance can only be @code{verbatim}. Also, when you use an ephemeral
+ChangeLog, beware to use a file name that doesn't conflict with existing
+files (old ChangeLog files may for example be renamed to
@file{ChangeLog.dead}).
+Because there's only one, virtual, ephemeral ChangeLog file located at
+the project's base directory, the default value for the ChangeLogs
+prologue doesn't work very well in the ephemeral case. It doesn't make
+sense to refer to the file itself, since it's only temporary. A simpler
+prologue like ``ChangeLog entries:'' would suffice. Patcher provides a
+built-in theme called @samp{ephemeral-change-logs} that you can use to
+both set the ChangeLog status to @samp{ephemeral} and modify the
+prologue at the same time.
+
One final note: if you use the @code{git-index} built-in theme with
ephemeral ChangeLogs, don't use it in conjunction with
@code{git-index-automatic-change-logs}, even if the ChangeLogs entries
Repository URL:
https://bitbucket.org/xemacs/patcher/
--
This is a commit notification from
bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches