[darcs-devel] [issue1300] darcs record --delete-logfile should only delete after a successful record.
Kamil Dworakowski
bugs at darcs.net
Mon Mar 15 11:01:03 UTC 2010
Kamil Dworakowski <kamil at dworakowski.name> added the comment:
The following patch updated the status of issue1300 to be resolved:
* resolve issue1300: logfile deleted on unsucessful record
Ignore-this: ead95914b26e0df6a79450a1d955abe3
Don't honour --delete-logfile when the record fails for any reason, a test
failure for instance.
I have changed the definition of get_log not to delete the logfile, but to
return it for deferred deletion. I capitalized on the fact that get_log
was already returning (Just temp_logfile) for deferred deletion.
get_log is an exported name, used in AmendRecord, Tag and Rollback. Some
of them ignore the logfile to delete, though none of them accept
--delete-logfile flag, and thus they don't need to change, nor are they
affected in any way.
Unintended side effect of the change: with --delete-logfile flag present, a
massage '"Logfile left in " ++ filepath' gets printed in case of the test
failure on record. This may actually be desirable so I did not bother to
change it.
__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/issue1300>
__________________________________
More information about the darcs-devel
mailing list