[ Please use "diff -u" to make more readable diffs ]

Masatake YAMATO <[EMAIL PROTECTED]> writes:

> *** xtla.el   2004-06-16 21:51:10.000000000 +0900
> --- xtla.el.new       2004-06-16 21:49:23.000000000 +0900
> ***************
> *** 1125,1131 ****
>            (changes-buffer (or output-buffer (tla--get-buffer-create
>                                               'changes root)))
>            (header ""))
> !     (if (or no-switch tla-switch-to-buffer-first)
>           (set-buffer changes-buffer)
>         (tla-switch-to-buffer changes-buffer))
>       (let (buffer-read-only)
> --- 1125,1131 ----
>            (changes-buffer (or output-buffer (tla--get-buffer-create
>                                               'changes root)))
>            (header ""))
> !     (if (or no-switch (not tla-switch-to-buffer-first))
>           (set-buffer changes-buffer)
>         (tla-switch-to-buffer changes-buffer))
>       (let (buffer-read-only)
>
> With the original code the changes-buffer is never shown if 
> tla-switch-to-buffer-first is 
> non-nil. I think this is unexpected behavios. Right?

No, the original code is OK here. This is the body of
tla-show-changes-buffer, the process sentinel. If
tla-switch-to-buffer-first is true, the "switch-to-buffer" must have
been done before launching the process.

This works well for M-x tla-changes RET, maybe this broke some other
commands, but that's not the place to fix it.

> ***************
> *** 1880,1888 ****
>                                        ;;                                     
> (tla--show-last--process-buffer)
>                                        (tla-show-changes-buffer output)
>                                        (message "tla star-merge finished")
> !                                      (tla-revert-some-buffers ,to-tree))
> !                         :error (lambda (output error status arguments)
> !                                  (tla-show-changes-buffer output)))))
>   
>   (defun tla-replay (from &optional to-tree)
>     (interactive (list
> --- 1880,1886 ----
>                                        ;;                                     
> (tla--show-last--process-buffer)
>                                        (tla-show-changes-buffer output)
>                                        (message "tla star-merge finished")
> !                                      (tla-revert-some-buffers ,to-tree)))))
>   
>   (defun tla-replay (from &optional to-tree)
>     (interactive (list
>
> With the original :error handler, output is processed. It is ok if the 
> process 
> exists with 0 status. However, when an error is occured, the error output is
> not shown. Here I think we should use default behavior.

Be carefull: an non-zero exit status is not allways an error. For
example, "tla changes" will exit with a status 1 if there are some
changes in the local tree.

For tla star-merge, I'm not sure (it's not documented. See the
source :-( ). I think a status of 1 means there were some conflicts.
If this is the case, we need to test the value of "status" in
the :error handler, but not remove it.

-- 
Matthieu

Reply via email to