[darcs-devel] darcs patch: Raise exception if unable to open logfile (issue142).

Tommy Pettersson ptp at lysator.liu.se
Thu Aug 10 10:29:50 PDT 2006


On Wed, Aug 09, 2006 at 11:59:38PM -0400, Zachary P. Landau wrote:
> Issue 142 must have slipped by me when it was first posted.  Can anyone think
> of any reason why we would want the catch I removed to fix this bug?

The line with the `catch` was added by the patch

  Thu Aug 26 13:39:26 CEST 2004  David Roundy <droundy at abridgegame.org>
    * support --logfile with no such file existing.

I'm not sure, but I remember a discussion of a usage pattern
with "--logfile=log" in prefs/defaults, where nibbles were added
to log as the code was changed, and then it was removed after
record. In such case a non-existing file should be treated as no
long comment. But on second thought, it would be possible, or
even perhaps better, to use something like "clear log" instead
of "rm log".

Another thought is what to do with the combination of --logfile
and --edit-long-comment. Then it would be more helpful to start
with a blank comment then to fail. But if we should catch
something is should only be noexist. Other errors, like no read
permission, should not result in an empty long comment to edit.

In any case, the failure happens not until after any ask-depends
and the short name prompt, which is a bit annoying, although
better then the current surprise of _no_ long comment.


-- 
Tommy Pettersson <ptp at lysator.liu.se>




More information about the darcs-devel mailing list