darcs

Patch 1874 fix in add command: fail unconditionally when no files...

Title fix in add command: fail unconditionally when no files...
Superseder Nosy List bfrk
Related Issues
Status accepted Assigned To
Milestone

Created on 2019-08-15.07:28:08 by bfrk, last changed 2019-08-26.11:59:31 by ganesh.

Files
File name Status Uploaded Type Edit Remove
fix-in-add-command_-fail-unconditionally-when-no-files-were-added.dpatch bfrk, 2019-08-15.07:28:07 application/x-darcs-patch
patch-preview.txt bfrk, 2019-08-15.07:28:07 text/x-darcs-patch
unnamed bfrk, 2019-08-15.07:28:07 text/plain
See mailing list archives for discussion on individual patches.
Messages
msg21105 (view) Author: bfrk Date: 2019-08-15.07:28:07
I am not screening this one immediately. It is an incompatible change to the
semantics of 'darcs add'. IMO a bug fix but YMMV.

1 patch for repository http://darcs.net/screened:

patch 120001d4caa98aff0ad92de2970ad4d2b3466eb4
Author: Ben Franksen <ben.franksen@online.de>
Date:   Thu Jul 11 19:16:06 CEST 2019
  * fix in add command: fail unconditionally when no files were added
  
  Whether a command fails should not depend on verbosity.
Attachments
msg21116 (view) Author: ganesh Date: 2019-08-15.23:34:46
The behaviour should certainly not depend on verbosity. I guess
it's debatable whether we should fail or not when there's nothing to
do but I don't feel strongly either way.
msg21121 (view) Author: bfrk Date: 2019-08-16.08:12:42
> The behaviour should certainly not depend on verbosity. I guess
> it's debatable whether we should fail or not when there's nothing to
> do but I don't feel strongly either way.

I think failing when there is nothing to do was done to support
scripting, so you could say 'if darcs add ... then ...'. Not sure if
anyone seriously relies on that. My preference would be not to fail in
such situations, except perhaps for pure query commands (whatsnew, log).

BTW, I always liked the way darcs tells me "You don't want to xxx
anything and that's fine with me" which to me means " Yes, I have
successfully done nothing, exactly as you requested". But that's
probably just the methematician in me ;-)
msg21124 (view) Author: ganesh Date: 2019-08-16.10:57:54
> I think failing when there is nothing to do was done to support
> scripting, so you could say 'if darcs add ... then ...'. Not sure if
> anyone seriously relies on that. My preference would be not to fail in
> such situations, except perhaps for pure query commands (whatsnew, log).

It's hard to say. There are cases where it would usefully indicate that
you did actually make a mistake (e.g. a typo in a filename) and in a
script having that signalled might be useful. But then there are plenty
of other mistakes that wouldn't be signalled anyway.

> BTW, I always liked the way darcs tells me "You don't want to xxx
> anything and that's fine with me" which to me means " Yes, I have
> successfully done nothing, exactly as you requested". But that's
> probably just the methematician in me ;-)

Yeah, I like it too :-)
msg21129 (view) Author: bfrk Date: 2019-08-17.09:51:09
Screening this then as is. The new behavior is as close to the
existing one as can be reasonably expected.
History
Date User Action Args
2019-08-15 07:28:08bfrkcreate
2019-08-15 23:34:46ganeshsetmessages: + msg21116
2019-08-16 08:12:42bfrksetmessages: + msg21121
2019-08-16 10:57:54ganeshsetmessages: + msg21124
2019-08-17 09:51:10bfrksetstatus: needs-screening -> needs-review
messages: + msg21129
2019-08-25 15:42:29ganeshsetstatus: needs-review -> accepted-pending-tests
2019-08-26 11:59:31ganeshsetstatus: accepted-pending-tests -> accepted