>>>> "Didier" == Didier Verna
<didier(a)xemacs.org> writes:
Didier> Could you give me a backtrace please ?
The backtrace is:
# bind (standard-output stack-trace-on-signal debug-on-signal stack-trace-on-error
debug-on-error)
# (unwind-protect ...)
signal(error ("/Users/malcolmp/builds/xemacs/sandboxen.hg/carbon2-configure/dev/:
no such directory"))
# bind (args datum)
cerror("%s: no such directory"
"/Users/malcolmp/builds/xemacs/sandboxen.hg/carbon2-configure/dev/")
apply(cerror "%s: no such directory"
"/Users/malcolmp/builds/xemacs/sandboxen.hg/carbon2-configure/dev/")
# bind (args datum)
error("%s: no such directory"
"/Users/malcolmp/builds/xemacs/sandboxen.hg/carbon2-configure/dev/")
# bind (dir)
cd-absolute("/Users/malcolmp/builds/xemacs/sandboxen.hg/carbon2-configure/dev")
# bind (dir)
cd("/Users/malcolmp/builds/xemacs/sandboxen.hg/carbon2-configure/dev")
# (unwind-protect ...)
(save-current-buffer (set-buffer temp-buffer) (cd (expand-file-name dirname
default-directory)) (find-change-log))
(with-current-buffer temp-buffer (cd (expand-file-name dirname default-directory))
(find-change-log))
# (unwind-protect ...)
(unwind-protect (with-current-buffer temp-buffer (cd (expand-file-name dirname
default-directory)) (find-change-log)) (and (buffer-name temp-buffer) (kill-buffer
temp-buffer)))
# bind (temp-buffer)
(let ((temp-buffer (get-buffer-create (generate-new-buffer-name " *temp*"))))
(unwind-protect (with-current-buffer temp-buffer (cd (expand-file-name dirname
default-directory)) (find-change-log)) (and (buffer-name temp-buffer) (kill-buffer
temp-buffer))))
(with-temp-buffer (cd (expand-file-name dirname default-directory)) (find-change-log))
(setq change-log (with-temp-buffer (cd (expand-file-name dirname default-directory))
(find-change-log)))
(while (re-search-forward file-re max t) (setq file (match-string 1)) (if (string-match
basename-re file) (setq dirname (match-string 1 file)) (setq dirname "")) (setq
absfile (expand-file-name file default-directory)) (setq beg (point-at-bol)) (setq end (or
(save-excursion (and (re-search-forward file-re max t) (point-at-bol))) max)) (setq
change-log (with-temp-buffer (cd (expand-file-name dirname default-directory))
(find-change-log))) (let ((extent (make-extent beg end))) (set-extent-properties extent
(quote (start-open t duplicable t))) (set-extent-property extent (if (string= change-log
absfile) (quote patcher-change-log) (quote patcher-source)) absfile)))
# (unwind-protect ...)
(save-excursion (goto-char min) (save-excursion (and (re-search-forward file-re1 max t)
(setq file-re file-re1))) (while (re-search-forward file-re max t) (setq file
(match-string 1)) (if (string-match basename-re file) (setq dirname (match-string 1 file))
(setq dirname "")) (setq absfile (expand-file-name file default-directory))
(setq beg (point-at-bol)) (setq end (or (save-excursion (and (re-search-forward file-re
max t) (point-at-bol))) max)) (setq change-log (with-temp-buffer (cd (expand-file-name
dirname default-directory)) (find-change-log))) (let ((extent (make-extent beg end)))
(set-extent-properties extent (quote (start-open t duplicable t))) (set-extent-property
extent (if (string= change-log absfile) (quote patcher-change-log) (quote patcher-source))
absfile))) (goto-char min) (re-search-forward (patcher-project-option patcher-project
:failed-command-regexp) max t))
# bind (end beg dirname absfile file change-log max min basename-re file-re file-re1)
(let ((file-re1 "^Index: \\(\\S-*\\)") (file-re "^\\+\\+\\+
\\(\\S-*\\)") (basename-re "\\`\\(.*\\)/\\(.*\\)\\'") (min (or min
(point-min))) (max (or max (point-max))) change-log file absfile dirname beg end)
(save-excursion (goto-char min) (save-excursion (and (re-search-forward file-re1 max t)
(setq file-re file-re1))) (while (re-search-forward file-re max t) (setq file
(match-string 1)) (if (string-match basename-re file) (setq dirname (match-string 1 file))
(setq dirname "")) (setq absfile (expand-file-name file default-directory))
(setq beg (point-at-bol)) (setq end (or (save-excursion (and (re-search-forward file-re
max t) (point-at-bol))) max)) (setq change-log (with-temp-buffer (cd (expand-file-name
dirname default-directory)) (find-change-log))) (let ((extent (make-extent beg end)))
(set-extent-properties extent (quote (start-open t duplicable t))) (set-extent-property
extent (if (string= change-log absfile) (quote patcher-change-log) (quote patcher-source))
absfi!
le))) (goto-char min) (re-search-forward (patcher-project-option patcher-project
:failed-command-regexp) max t)))
# (unwind-protect ...)
(save-current-buffer (set-buffer (or buffer (current-buffer))) (let ((file-re1
"^Index: \\(\\S-*\\)") (file-re "^\\+\\+\\+ \\(\\S-*\\)") (basename-re
"\\`\\(.*\\)/\\(.*\\)\\'") (min (or min (point-min))) (max (or max
(point-max))) change-log file absfile dirname beg end) (save-excursion (goto-char min)
(save-excursion (and (re-search-forward file-re1 max t) (setq file-re file-re1))) (while
(re-search-forward file-re max t) (setq file (match-string 1)) (if (string-match
basename-re file) (setq dirname (match-string 1 file)) (setq dirname "")) (setq
absfile (expand-file-name file default-directory)) (setq beg (point-at-bol)) (setq end (or
(save-excursion (and (re-search-forward file-re max t) (point-at-bol))) max)) (setq
change-log (with-temp-buffer (cd (expand-file-name dirname default-directory))
(find-change-log))) (let ((extent (make-extent beg end))) (set-extent-properties extent
(quote (start-open t duplicable t))) (set-extent-property extent (if (string= change-log
ab!
sfile) (quote patcher-change-log) (quote patcher-source)) absfile))) (goto-char min)
(re-search-forward (patcher-project-option patcher-project :failed-command-regexp) max
t))))
(with-current-buffer (or buffer (current-buffer)) (let ((file-re1 "^Index:
\\(\\S-*\\)") (file-re "^\\+\\+\\+ \\(\\S-*\\)") (basename-re
"\\`\\(.*\\)/\\(.*\\)\\'") (min (or min (point-min))) (max (or max
(point-max))) change-log file absfile dirname beg end) (save-excursion (goto-char min)
(save-excursion (and (re-search-forward file-re1 max t) (setq file-re file-re1))) (while
(re-search-forward file-re max t) (setq file (match-string 1)) (if (string-match
basename-re file) (setq dirname (match-string 1 file)) (setq dirname "")) (setq
absfile (expand-file-name file default-directory)) (setq beg (point-at-bol)) (setq end (or
(save-excursion (and (re-search-forward file-re max t) (point-at-bol))) max)) (setq
change-log (with-temp-buffer (cd (expand-file-name dirname default-directory))
(find-change-log))) (let ((extent (make-extent beg end))) (set-extent-properties extent
(quote (start-open t duplicable t))) (set-extent-property extent (if (string= change-log
absfile) (quote!
patcher-change-log) (quote patcher-source)) absfile))) (goto-char min)
(re-search-forward (patcher-project-option patcher-project :failed-command-regexp) max
t))))
# bind (buffer max min)
patcher-parse-region(nil nil #<buffer " *Patcher Process Output*">)
(if (patcher-parse-region nil nil buffer) (progn (display-buffer buffer t)
(patcher-error "Error during diff. Please fix the problem and type
\\[patcher-generate-diff] to try again.")))
(when (patcher-parse-region nil nil buffer) (display-buffer buffer t) (patcher-error
"Error during diff. Please fix the problem and type \\[patcher-generate-diff] to try
again."))
# bind (buffer)
patcher-diff-base(#<buffer " *Patcher Process Output*">)
# bind (change-logs-extent generate-change-logs)
(let ((generate-change-logs t) (change-logs-extent (patcher-extent (quote
patcher-change-logs)))) (when regenerate (patcher-with-information (format "ChangeLog
skeletons for this patch have already been generated%s.\n\nIf you answer `yes' to the
question below, both the diff and the ChangeLog\nentries will be regenerated. This means
that current ChangeLog entries will be\nlost. If otherwise your answer is `no', only
the diff will be regenerated." (if change-logs-extent " and inserted"
"")) (setq generate-change-logs (yes-or-no-p "Regenerate ChangeLog
skeletons ? "))) (when generate-change-logs (patcher-delete-extent-and-region
change-logs-extent) (patcher-ungenerate-change-logs))) (patcher-diff-base buffer) (when
(if regenerate (and generate-change-logs (not patcher-sources) (patcher-change-logs
buffer)) (and (not patcher-sources) (patcher-change-logs buffer)))
(patcher-change-logs-diff-error)) (patcher-insert-diff buffer)
(patcher-insert-diff-prologue (quote sources)) (!
if generate-change-logs (progn (patcher-generate-change-logs patcher-diff-marker
(extent-end-position (patcher-extent (quote patcher-diff)))) (patcher-message "Please
annotate the ChangeLog skeletons, and type \\[patcher-insert-change-logs] to %s
them." (if (eq appearance (quote verbatim)) "insert" "diff")))
(if change-logs-extent (patcher-message "To commit your changes, type
\\[patcher-commit-change].") (patcher-message "Please type
\\[patcher-insert-change-logs] to %s the ChangeLogs" (if (eq appearance (quote
verbatim)) "insert" "diff")))))
(cond ((or (eq appearance (quote verbatim)) (eq appearance (quote packed))) (let
((generate-change-logs t) (change-logs-extent (patcher-extent (quote
patcher-change-logs)))) (when regenerate (patcher-with-information (format "ChangeLog
skeletons for this patch have already been generated%s.\n\nIf you answer `yes' to the
question below, both the diff and the ChangeLog\nentries will be regenerated. This means
that current ChangeLog entries will be\nlost. If otherwise your answer is `no', only
the diff will be regenerated." (if change-logs-extent " and inserted"
"")) (setq generate-change-logs (yes-or-no-p "Regenerate ChangeLog
skeletons ? "))) (when generate-change-logs (patcher-delete-extent-and-region
change-logs-extent) (patcher-ungenerate-change-logs))) (patcher-diff-base buffer) (when
(if regenerate (and generate-change-logs (not patcher-sources) (patcher-change-logs
buffer)) (and (not patcher-sources) (patcher-change-logs buffer)))
(patcher-change-logs-diff-error)) (!
patcher-insert-diff buffer) (patcher-insert-diff-prologue (quote sources)) (if
generate-change-logs (progn (patcher-generate-change-logs patcher-diff-marker
(extent-end-position (patcher-extent (quote patcher-diff)))) (patcher-message "Please
annotate the ChangeLog skeletons, and type \\[patcher-insert-change-logs] to %s
them." (if (eq appearance (quote verbatim)) "insert" "diff")))
(if change-logs-extent (patcher-message "To commit your changes, type
\\[patcher-commit-change].") (patcher-message "Please type
\\[patcher-insert-change-logs] to %s the ChangeLogs" (if (eq appearance (quote
verbatim)) "insert" "diff")))))) ((eq appearance (quote patch)) (let
((generate-change-logs t)) (when regenerate (patcher-with-information "ChangeLog
skeletons for this patch have already been generated.\n\nIf you answer `yes' to the
question below, the ChangeLog entries will be\nregenerated. This means that current ones
will be lost. If otherwise your\nanswer is `no', it is assumed that y!
ou have edited the skeletons, and the\nproject will be rediff'!
ed with
them." (setq generate-change-logs (yes-or-no-p "Regenerate ChangeLog skeletons ?
"))) (and generate-change-logs (patcher-ungenerate-change-logs))) (if
generate-change-logs (progn (patcher-diff-base buffer) (when (and (not patcher-sources)
(patcher-change-logs buffer)) (patcher-change-logs-diff-error))
(patcher-generate-change-logs nil nil buffer) (patcher-message "Please annotate the
ChangeLog skeletons, and type \\[patcher-insert-change-logs] to create the whole
diff.")) (let ((command (patcher-project-option patcher-project
:change-logs-diff-command))) (cond ((eq command (quote diff)) (patcher-diff-all)
(patcher-insert-diff-prologue (quote mixed))) ((stringp command) (patcher-diff-all)
(patcher-convert-change-log-diffs command) (patcher-insert-diff-prologue command)) (t
(patcher-error "invalid `change-logs-diff-command' option: %s" command))))
(patcher-message "To commit your changes, type \\[patcher-commit-change]."))))
((not appearance) (let ((generate-change-logs t)) (w!
hen regenerate (patcher-with-information "ChangeLog skeletons for this patch have
already been generated.\n\nIf you answer `yes' to the question below, the ChangeLog
entries will be\nregenerated. This means that current ones will be lost. If otherwise
your\nanswer is `no', the current CHangeLog entries won't be touched." (setq
generate-change-logs (yes-or-no-p "Regenerate ChangeLog skeletons ? "))) (and
generate-change-logs (patcher-ungenerate-change-logs))) (if generate-change-logs (progn
(patcher-diff-base buffer) (when (and (not patcher-sources) (patcher-change-logs buffer))
(patcher-change-logs-diff-error)) (patcher-insert-diff buffer)
(patcher-insert-diff-prologue (quote sources)) (patcher-generate-change-logs
patcher-diff-marker (extent-end-position (patcher-extent (quote patcher-diff)))) (message
"Please don't forget to annotate the ChangeLog skeletons."))
(patcher-diff-base buffer) (patcher-remove-change-logs buffer) (patcher-insert-diff
buffer) (patcher-insert-di!
ff-prologue (quote sources)) (patcher-message "To commit your !
changes,
type \\[patcher-commit-change].")))) (t (patcher-error "invalid
`change-logs-appearance' option: %s" appearance)))
(cond ((eq updating (quote automatic)) (cond ((or (eq appearance (quote verbatim)) (eq
appearance (quote packed))) (let ((generate-change-logs t) (change-logs-extent
(patcher-extent (quote patcher-change-logs)))) (when regenerate (patcher-with-information
(format "ChangeLog skeletons for this patch have already been generated%s.\n\nIf you
answer `yes' to the question below, both the diff and the ChangeLog\nentries will be
regenerated. This means that current ChangeLog entries will be\nlost. If otherwise your
answer is `no', only the diff will be regenerated." (if change-logs-extent "
and inserted" "")) (setq generate-change-logs (yes-or-no-p "Regenerate
ChangeLog skeletons ? "))) (when generate-change-logs
(patcher-delete-extent-and-region change-logs-extent) (patcher-ungenerate-change-logs)))
(patcher-diff-base buffer) (when (if regenerate (and generate-change-logs (not
patcher-sources) (patcher-change-logs buffer)) (and (not patcher-sources)
(patcher-change-logs buffer!
))) (patcher-change-logs-diff-error)) (patcher-insert-diff buffer)
(patcher-insert-diff-prologue (quote sources)) (if generate-change-logs (progn
(patcher-generate-change-logs patcher-diff-marker (extent-end-position (patcher-extent
(quote patcher-diff)))) (patcher-message "Please annotate the ChangeLog skeletons,
and type \\[patcher-insert-change-logs] to %s them." (if (eq appearance (quote
verbatim)) "insert" "diff"))) (if change-logs-extent (patcher-message
"To commit your changes, type \\[patcher-commit-change].") (patcher-message
"Please type \\[patcher-insert-change-logs] to %s the ChangeLogs" (if (eq
appearance (quote verbatim)) "insert" "diff")))))) ((eq appearance
(quote patch)) (let ((generate-change-logs t)) (when regenerate (patcher-with-information
"ChangeLog skeletons for this patch have already been generated.\n\nIf you answer
`yes' to the question below, the ChangeLog entries will be\nregenerated. This means
that current ones will be lost. If otherwise you!
r\nanswer is `no', it is assumed that you have edited the skel!
etons, a
nd the\nproject will be rediff'ed with them." (setq generate-change-logs
(yes-or-no-p "Regenerate ChangeLog skeletons ? "))) (and generate-change-logs
(patcher-ungenerate-change-logs))) (if generate-change-logs (progn (patcher-diff-base
buffer) (when (and (not patcher-sources) (patcher-change-logs buffer))
(patcher-change-logs-diff-error)) (patcher-generate-change-logs nil nil buffer)
(patcher-message "Please annotate the ChangeLog skeletons, and type
\\[patcher-insert-change-logs] to create the whole diff.")) (let ((command
(patcher-project-option patcher-project :change-logs-diff-command))) (cond ((eq command
(quote diff)) (patcher-diff-all) (patcher-insert-diff-prologue (quote mixed))) ((stringp
command) (patcher-diff-all) (patcher-convert-change-log-diffs command)
(patcher-insert-diff-prologue command)) (t (patcher-error "invalid
`change-logs-diff-command' option: %s" command)))) (patcher-message "To
commit your changes, type \\[patcher-commit-change].")))) ((not appeara!
nce) (let ((generate-change-logs t)) (when regenerate (patcher-with-information
"ChangeLog skeletons for this patch have already been generated.\n\nIf you answer
`yes' to the question below, the ChangeLog entries will be\nregenerated. This means
that current ones will be lost. If otherwise your\nanswer is `no', the current
CHangeLog entries won't be touched." (setq generate-change-logs (yes-or-no-p
"Regenerate ChangeLog skeletons ? "))) (and generate-change-logs
(patcher-ungenerate-change-logs))) (if generate-change-logs (progn (patcher-diff-base
buffer) (when (and (not patcher-sources) (patcher-change-logs buffer))
(patcher-change-logs-diff-error)) (patcher-insert-diff buffer)
(patcher-insert-diff-prologue (quote sources)) (patcher-generate-change-logs
patcher-diff-marker (extent-end-position (patcher-extent (quote patcher-diff)))) (message
"Please don't forget to annotate the ChangeLog skeletons."))
(patcher-diff-base buffer) (patcher-remove-change-logs buffer) (patcher!
-insert-diff buffer) (patcher-insert-diff-prologue (quote sour!
ces)) (p
atcher-message "To commit your changes, type \\[patcher-commit-change].")))) (t
(patcher-error "invalid `change-logs-appearance' option: %s" appearance))))
((eq updating (quote manual)) (patcher-diff-base buffer) (when (and (not patcher-sources)
(not (equal (patcher-change-logs buffer) (mapcar (quote car) patcher-change-logs))))
(patcher-error "Some ChangeLog files are not updated. Please update them before
running Patcher.")) (cond ((eq appearance (quote verbatim))
(patcher-remove-change-logs buffer) (patcher-insert-diff buffer)
(patcher-insert-diff-prologue (quote sources)) (or regenerate
(patcher-insert-change-logs-verbatim))) ((eq appearance (quote packed)) (let ((command
(patcher-project-option patcher-project :change-logs-diff-command))) (cond ((eq command
(quote diff)) (if (not patcher-sources) (progn (and regenerate (patcher-remove-change-logs
buffer)) (patcher-insert-diff buffer) (patcher-insert-diff-prologue (quote sources)) (or
regenerate (patcher-pack-change-log!
s))) (patcher-remove-change-logs buffer) (patcher-insert-diff buffer)
(patcher-insert-diff-prologue (quote sources)) (or regenerate (patcher-diff-change-logs
patcher-diff-command)))) ((stringp command) (patcher-remove-change-logs buffer)
(patcher-insert-diff buffer) (patcher-insert-diff-prologue (quote sources)) (or regenerate
(patcher-diff-change-logs command))) (t (patcher-error "invalid
`change-logs-diff-command' option: %s" command))))) ((eq appearance (quote
patch)) (let ((command (patcher-project-option patcher-project
:change-logs-diff-command))) (cond ((eq command (quote diff)) (if patcher-sources (progn
(patcher-diff-all) (patcher-insert-diff-prologue (quote mixed))) (patcher-insert-diff
buffer) (patcher-insert-diff-prologue (quote mixed)))) ((stringp command) (if (not
patcher-sources) (progn (patcher-insert-diff buffer) (patcher-insert-diff-prologue
command) (patcher-convert-change-log-diffs command)) (patcher-diff-all)
(patcher-insert-diff-prologue command) (patc!
her-convert-change-log-diffs command))) (t (patcher-error "inv!
alid `ch
ange-logs-diff-command' option: %s" command))))) ((not appearance)
(patcher-remove-change-logs buffer) (patcher-insert-diff buffer)
(patcher-insert-diff-prologue (quote sources))) (t (patcher-error "invalid
`change-logs-appearance' option: %s" appearance))) (patcher-message "To
commit your changes, type \\[patcher-commit-change].")) (t (patcher-error
"invalid `change-logs-updating' option: %s" updating)))
(if (not updating) (progn (patcher-diff-base buffer) (patcher-insert-diff buffer)
(patcher-insert-diff-prologue (quote sources)) (patcher-message "To commit your
changes, type \\[patcher-commit-change].")) (cond ((eq updating (quote automatic))
(cond ((or (eq appearance (quote verbatim)) (eq appearance (quote packed))) (let
((generate-change-logs t) (change-logs-extent (patcher-extent (quote
patcher-change-logs)))) (when regenerate (patcher-with-information (format "ChangeLog
skeletons for this patch have already been generated%s.\n\nIf you answer `yes' to the
question below, both the diff and the ChangeLog\nentries will be regenerated. This means
that current ChangeLog entries will be\nlost. If otherwise your answer is `no', only
the diff will be regenerated." (if change-logs-extent " and inserted"
"")) (setq generate-change-logs (yes-or-no-p "Regenerate ChangeLog
skeletons ? "))) (when generate-change-logs (patcher-delete-extent-and-region
change-logs-extent) (patcher-!
ungenerate-change-logs))) (patcher-diff-base buffer) (when (if regenerate (and
generate-change-logs (not patcher-sources) (patcher-change-logs buffer)) (and (not
patcher-sources) (patcher-change-logs buffer))) (patcher-change-logs-diff-error))
(patcher-insert-diff buffer) (patcher-insert-diff-prologue (quote sources)) (if
generate-change-logs (progn (patcher-generate-change-logs patcher-diff-marker
(extent-end-position (patcher-extent (quote patcher-diff)))) (patcher-message "Please
annotate the ChangeLog skeletons, and type \\[patcher-insert-change-logs] to %s
them." (if (eq appearance (quote verbatim)) "insert" "diff")))
(if change-logs-extent (patcher-message "To commit your changes, type
\\[patcher-commit-change].") (patcher-message "Please type
\\[patcher-insert-change-logs] to %s the ChangeLogs" (if (eq appearance (quote
verbatim)) "insert" "diff")))))) ((eq appearance (quote patch)) (let
((generate-change-logs t)) (when regenerate (patcher-with-information "ChangeLog!
skeletons for this patch have already been generated.\n\nIf y!
ou answe
r `yes' to the question below, the ChangeLog entries will be\nregenerated. This means
that current ones will be lost. If otherwise your\nanswer is `no', it is assumed that
you have edited the skeletons, and the\nproject will be rediff'ed with them."
(setq generate-change-logs (yes-or-no-p "Regenerate ChangeLog skeletons ? ")))
(and generate-change-logs (patcher-ungenerate-change-logs))) (if generate-change-logs
(progn (patcher-diff-base buffer) (when (and (not patcher-sources) (patcher-change-logs
buffer)) (patcher-change-logs-diff-error)) (patcher-generate-change-logs nil nil buffer)
(patcher-message "Please annotate the ChangeLog skeletons, and type
\\[patcher-insert-change-logs] to create the whole diff.")) (let ((command
(patcher-project-option patcher-project :change-logs-diff-command))) (cond ((eq command
(quote diff)) (patcher-diff-all) (patcher-insert-diff-prologue (quote mixed))) ((stringp
command) (patcher-diff-all) (patcher-convert-change-log-diffs command) (pat!
cher-insert-diff-prologue command)) (t (patcher-error "invalid
`change-logs-diff-command' option: %s" command)))) (patcher-message "To
commit your changes, type \\[patcher-commit-change].")))) ((not appearance) (let
((generate-change-logs t)) (when regenerate (patcher-with-information "ChangeLog
skeletons for this patch have already been generated.\n\nIf you answer `yes' to the
question below, the ChangeLog entries will be\nregenerated. This means that current ones
will be lost. If otherwise your\nanswer is `no', the current CHangeLog entries
won't be touched." (setq generate-change-logs (yes-or-no-p "Regenerate
ChangeLog skeletons ? "))) (and generate-change-logs
(patcher-ungenerate-change-logs))) (if generate-change-logs (progn (patcher-diff-base
buffer) (when (and (not patcher-sources) (patcher-change-logs buffer))
(patcher-change-logs-diff-error)) (patcher-insert-diff buffer)
(patcher-insert-diff-prologue (quote sources)) (patcher-generate-change-logs
patcher-diff-mar!
ker (extent-end-position (patcher-extent (quote patcher-diff))!
)) (mess
age "Please don't forget to annotate the ChangeLog skeletons."))
(patcher-diff-base buffer) (patcher-remove-change-logs buffer) (patcher-insert-diff
buffer) (patcher-insert-diff-prologue (quote sources)) (patcher-message "To commit
your changes, type \\[patcher-commit-change].")))) (t (patcher-error "invalid
`change-logs-appearance' option: %s" appearance)))) ((eq updating (quote manual))
(patcher-diff-base buffer) (when (and (not patcher-sources) (not (equal
(patcher-change-logs buffer) (mapcar (quote car) patcher-change-logs)))) (patcher-error
"Some ChangeLog files are not updated. Please update them before running
Patcher.")) (cond ((eq appearance (quote verbatim)) (patcher-remove-change-logs
buffer) (patcher-insert-diff buffer) (patcher-insert-diff-prologue (quote sources)) (or
regenerate (patcher-insert-change-logs-verbatim))) ((eq appearance (quote packed)) (let
((command (patcher-project-option patcher-project :change-logs-diff-command))) (cond ((eq
command (quote di!
ff)) (if (not patcher-sources) (progn (and regenerate (patcher-remove-change-logs
buffer)) (patcher-insert-diff buffer) (patcher-insert-diff-prologue (quote sources)) (or
regenerate (patcher-pack-change-logs))) (patcher-remove-change-logs buffer)
(patcher-insert-diff buffer) (patcher-insert-diff-prologue (quote sources)) (or regenerate
(patcher-diff-change-logs patcher-diff-command)))) ((stringp command)
(patcher-remove-change-logs buffer) (patcher-insert-diff buffer)
(patcher-insert-diff-prologue (quote sources)) (or regenerate (patcher-diff-change-logs
command))) (t (patcher-error "invalid `change-logs-diff-command' option: %s"
command))))) ((eq appearance (quote patch)) (let ((command (patcher-project-option
patcher-project :change-logs-diff-command))) (cond ((eq command (quote diff)) (if
patcher-sources (progn (patcher-diff-all) (patcher-insert-diff-prologue (quote mixed)))
(patcher-insert-diff buffer) (patcher-insert-diff-prologue (quote mixed)))) ((stringp
command) (i!
f (not patcher-sources) (progn (patcher-insert-diff buffer) (p!
atcher-i
nsert-diff-prologue command) (patcher-convert-change-log-diffs command))
(patcher-diff-all) (patcher-insert-diff-prologue command)
(patcher-convert-change-log-diffs command))) (t (patcher-error "invalid
`change-logs-diff-command' option: %s" command))))) ((not appearance)
(patcher-remove-change-logs buffer) (patcher-insert-diff buffer)
(patcher-insert-diff-prologue (quote sources))) (t (patcher-error "invalid
`change-logs-appearance' option: %s" appearance))) (patcher-message "To
commit your changes, type \\[patcher-commit-change].")) (t (patcher-error
"invalid `change-logs-updating' option: %s" updating))))
# bind (regenerate appearance updating buffer)
(let ((buffer (patcher-process-output-buffer)) (updating (patcher-project-option
patcher-project :change-logs-updating)) (appearance (patcher-project-option
patcher-project :change-logs-appearance)) (regenerate (or (patcher-extent (quote
patcher-diff)) patcher-change-logs))) (and regenerate (patcher-delete-extent-and-region
(patcher-extent (quote patcher-diff)))) (if (not updating) (progn (patcher-diff-base
buffer) (patcher-insert-diff buffer) (patcher-insert-diff-prologue (quote sources))
(patcher-message "To commit your changes, type \\[patcher-commit-change]."))
(cond ((eq updating (quote automatic)) (cond ((or (eq appearance (quote verbatim)) (eq
appearance (quote packed))) (let ((generate-change-logs t) (change-logs-extent
(patcher-extent (quote patcher-change-logs)))) (when regenerate (patcher-with-information
(format "ChangeLog skeletons for this patch have already been generated%s.\n\nIf you
answer `yes' to the question below, both the diff and the ChangeLog\nentri!
es will be regenerated. This means that current ChangeLog entries will be\nlost. If
otherwise your answer is `no', only the diff will be regenerated." (if
change-logs-extent " and inserted" "")) (setq generate-change-logs
(yes-or-no-p "Regenerate ChangeLog skeletons ? "))) (when generate-change-logs
(patcher-delete-extent-and-region change-logs-extent) (patcher-ungenerate-change-logs)))
(patcher-diff-base buffer) (when (if regenerate (and generate-change-logs (not
patcher-sources) (patcher-change-logs buffer)) (and (not patcher-sources)
(patcher-change-logs buffer))) (patcher-change-logs-diff-error)) (patcher-insert-diff
buffer) (patcher-insert-diff-prologue (quote sources)) (if generate-change-logs (progn
(patcher-generate-change-logs patcher-diff-marker (extent-end-position (patcher-extent
(quote patcher-diff)))) (patcher-message "Please annotate the ChangeLog skeletons,
and type \\[patcher-insert-change-logs] to %s them." (if (eq appearance (quote
verbatim)) "insert" "!
diff"))) (if change-logs-extent (patcher-message "To commit yo!
ur chang
es, type \\[patcher-commit-change].") (patcher-message "Please type
\\[patcher-insert-change-logs] to %s the ChangeLogs" (if (eq appearance (quote
verbatim)) "insert" "diff")))))) ((eq appearance (quote patch)) (let
((generate-change-logs t)) (when regenerate (patcher-with-information "ChangeLog
skeletons for this patch have already been generated.\n\nIf you answer `yes' to the
question below, the ChangeLog entries will be\nregenerated. This means that current ones
will be lost. If otherwise your\nanswer is `no', it is assumed that you have edited
the skeletons, and the\nproject will be rediff'ed with them." (setq
generate-change-logs (yes-or-no-p "Regenerate ChangeLog skeletons ? "))) (and
generate-change-logs (patcher-ungenerate-change-logs))) (if generate-change-logs (progn
(patcher-diff-base buffer) (when (and (not patcher-sources) (patcher-change-logs buffer))
(patcher-change-logs-diff-error)) (patcher-generate-change-logs nil nil buffer)
(patcher-message "Please anno!
tate the ChangeLog skeletons, and type \\[patcher-insert-change-logs] to create the whole
diff.")) (let ((command (patcher-project-option patcher-project
:change-logs-diff-command))) (cond ((eq command (quote diff)) (patcher-diff-all)
(patcher-insert-diff-prologue (quote mixed))) ((stringp command) (patcher-diff-all)
(patcher-convert-change-log-diffs command) (patcher-insert-diff-prologue command)) (t
(patcher-error "invalid `change-logs-diff-command' option: %s" command))))
(patcher-message "To commit your changes, type \\[patcher-commit-change]."))))
((not appearance) (let ((generate-change-logs t)) (when regenerate
(patcher-with-information "ChangeLog skeletons for this patch have already been
generated.\n\nIf you answer `yes' to the question below, the ChangeLog entries will
be\nregenerated. This means that current ones will be lost. If otherwise your\nanswer is
`no', the current CHangeLog entries won't be touched." (setq
generate-change-logs (yes-or-no-p "Regenerate !
ChangeLog skeletons ? "))) (and generate-change-logs (patcher-!
ungenera
te-change-logs))) (if generate-change-logs (progn (patcher-diff-base buffer) (when (and
(not patcher-sources) (patcher-change-logs buffer)) (patcher-change-logs-diff-error))
(patcher-insert-diff buffer) (patcher-insert-diff-prologue (quote sources))
(patcher-generate-change-logs patcher-diff-marker (extent-end-position (patcher-extent
(quote patcher-diff)))) (message "Please don't forget to annotate the ChangeLog
skeletons.")) (patcher-diff-base buffer) (patcher-remove-change-logs buffer)
(patcher-insert-diff buffer) (patcher-insert-diff-prologue (quote sources))
(patcher-message "To commit your changes, type \\[patcher-commit-change]."))))
(t (patcher-error "invalid `change-logs-appearance' option: %s"
appearance)))) ((eq updating (quote manual)) (patcher-diff-base buffer) (when (and (not
patcher-sources) (not (equal (patcher-change-logs buffer) (mapcar (quote car)
patcher-change-logs)))) (patcher-error "Some ChangeLog files are not updated. Please
update them before runni!
ng Patcher.")) (cond ((eq appearance (quote verbatim)) (patcher-remove-change-logs
buffer) (patcher-insert-diff buffer) (patcher-insert-diff-prologue (quote sources)) (or
regenerate (patcher-insert-change-logs-verbatim))) ((eq appearance (quote packed)) (let
((command (patcher-project-option patcher-project :change-logs-diff-command))) (cond ((eq
command (quote diff)) (if (not patcher-sources) (progn (and regenerate
(patcher-remove-change-logs buffer)) (patcher-insert-diff buffer)
(patcher-insert-diff-prologue (quote sources)) (or regenerate (patcher-pack-change-logs)))
(patcher-remove-change-logs buffer) (patcher-insert-diff buffer)
(patcher-insert-diff-prologue (quote sources)) (or regenerate (patcher-diff-change-logs
patcher-diff-command)))) ((stringp command) (patcher-remove-change-logs buffer)
(patcher-insert-diff buffer) (patcher-insert-diff-prologue (quote sources)) (or regenerate
(patcher-diff-change-logs command))) (t (patcher-error "invalid
`change-logs-diff-comma!
nd' option: %s" command))))) ((eq appearance (quote patch)) (l!
et ((com
mand (patcher-project-option patcher-project :change-logs-diff-command))) (cond ((eq
command (quote diff)) (if patcher-sources (progn (patcher-diff-all)
(patcher-insert-diff-prologue (quote mixed))) (patcher-insert-diff buffer)
(patcher-insert-diff-prologue (quote mixed)))) ((stringp command) (if (not
patcher-sources) (progn (patcher-insert-diff buffer) (patcher-insert-diff-prologue
command) (patcher-convert-change-log-diffs command)) (patcher-diff-all)
(patcher-insert-diff-prologue command) (patcher-convert-change-log-diffs command))) (t
(patcher-error "invalid `change-logs-diff-command' option: %s" command)))))
((not appearance) (patcher-remove-change-logs buffer) (patcher-insert-diff buffer)
(patcher-insert-diff-prologue (quote sources))) (t (patcher-error "invalid
`change-logs-appearance' option: %s" appearance))) (patcher-message "To
commit your changes, type \\[patcher-commit-change].")) (t (patcher-error
"invalid `change-logs-updating' option: %s" updating)))))
patcher-generate-diff-1()
(progn (and arg (setq patcher-diff-command (read-shell-command "Diff command:
" patcher-diff-command))) (patcher-generate-diff-1))
(if (or (and (not (patcher-extent (quote patcher-diff))) (not patcher-change-logs))
(y-or-n-p "Really regenerate the diff ? ")) (progn (and arg (setq
patcher-diff-command (read-shell-command "Diff command: "
patcher-diff-command))) (patcher-generate-diff-1)))
(when (or (and (not (patcher-extent (quote patcher-diff))) (not patcher-change-logs))
(y-or-n-p "Really regenerate the diff ? ")) (and arg (setq patcher-diff-command
(read-shell-command "Diff command: " patcher-diff-command)))
(patcher-generate-diff-1))
# bind (arg)
patcher-generate-diff(nil)
# (unwind-protect ...)
(save-excursion (insert "\n\n") (when (patcher-project-option project
:change-logs-updating) (let ((appearance (patcher-project-option project
:change-logs-appearance))) (when (and appearance (not (eq appearance (quote patch))))
(setq patcher-change-logs-marker (point-marker)) (insert "\n")))) (setq
patcher-diff-marker (point-marker)) (patcher-generate-diff override))
# bind (override files subject project)
patcher-mail-1(("carbon-configure"
"/Users/malcolmp/builds/xemacs/sandboxen.hg/carbon2-configure" :themes
(mercurial) :log-message-items (subject change-logs) :mail-method gnus :gnus-group
"nnimap+home:xemacs-patches" :to-address "xemacs-patches(a)xemacs.org")
"This is a test." nil nil)
# bind (arg subject project)
(lambda (project subject &optional arg) "Prepare a mail about a patch to apply
on a project.\nPROJECT is the name of the project (see the variables
`patcher-projects'\nand `patcher-subprojects').\nSUBJECT is the subject of the
mail.\n\nWhen called interactively, use a prefix (ARG) to override the value of\nthe diff
command to use for this project. Note that this is *not* the way\nto restrict the diff to
certain files. If you want to work on a subset of\nthe project (e.g. some files,
subdirectories etc), you have two\nalternatives:\n\n- for temporary subprojects, you can
use the function\n `patcher-mail-subproject', which lets you specify the list of
modified\n files / directories.\n- otherwise, you can also define the subprojects in the
variable\n `patcher-subprojects' and continue using this function.\n\nPlease note
that you can have multiple occurrences of a Patcher mail at\nthe same time, but not more
than one at a time on the same project unless\nyou use `patcher-!
mail-subproject' and the sections of the project don't\noverlap."
(interactive (let* ((prj (assoc (completing-read "Project: " (append
patcher-subprojects patcher-projects) nil t nil (quote patcher-projects-history)) (append
patcher-subprojects patcher-projects))) (sbj (read-string "Subject: " (let ((s
(patcher-project-option prj :subject))) (when (> (length s) 0) (patcher-substitute-name
prj s))) patcher-subjects-history))) (list prj sbj current-prefix-arg))) (patcher-mail-1
project subject (patcher-project-option project :files) (and (interactive-p)
arg)))(("carbon-configure"
"/Users/malcolmp/builds/xemacs/sandboxen.hg/carbon2-configure" :themes
(mercurial) :log-message-items (subject change-logs) :mail-method gnus :gnus-group
"nnimap+home:xemacs-patches" :to-address "xemacs-patches(a)xemacs.org")
"This is a test." nil)
call-interactively(patcher-mail)
command-execute(patcher-mail t)
# bind (_execute_command_keys_ _execute_command_name_ prefix-arg)
execute-extended-command(nil)
# bind (command-debug-status)
call-interactively(execute-extended-command)
(dispatch-event "[internal]")
# (condition-case ... . error)
# (catch top-level ...)
The entry in patcher-projects is:
("carbon-configure"
"/Users/malcolmp/builds/xemacs/sandboxen.hg/carbon2-configure"
:themes (mercurial)
:log-message-items (subject change-logs)
:mail-method gnus
:gnus-group "nnimap+home:xemacs-patches"
:to-address "xemacs-patches(a)xemacs.org")
Didier> What I suggest for now is to play with either the
Didier> diff-line-filter or after-diff-hook project options in order to
Didier> clean up the diff.
Thanks for the suggestion. I'll see what I can do.
Malcolm
--
Malcolm Purvis <malcolmp(a)xemacs.org>
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta