darcs

Patch 609 Make no changes if any to-be-added file ... (and 1 more)

Title Make no changes if any to-be-added file ... (and 1 more)
Superseder Nosy List kowey, owst
Related Issues
Status accepted Assigned To kowey
Milestone

Created on 2011-05-19.22:10:56 by owst, last changed 2011-10-12.06:24:18 by ganesh.

Files
File name Status Uploaded Type Edit Remove
make-no-changes-if-any-to_be_added-file-errors_.dpatch owst, 2011-05-19.22:10:55 application/x-darcs-patch
unnamed owst, 2011-05-19.22:10:55 text/x-darcs-patch
unnamed owst, 2011-05-19.22:10:55
See mailing list archives for discussion on individual patches.
Messages
msg14447 (view) Author: owst Date: 2011-05-19.22:10:55
2 patches for repository http://darcs.net/screened:

Thu May 19 22:57:59 BST 2011  Owen Stephens <darcs@owenstephens.co.uk>
  * Make no changes if any to-be-added file errors.
  Prior to this patch, the first file to be added to a new directory would
  implicitly add the directory. If the file itself didn't exist, the
  directory-add would still be present. Now, if any file-add fails, no changes
  are made.

Thu May 19 22:59:31 BST 2011  Owen Stephens <darcs@owenstephens.co.uk>
  * Fix test using incorrect grep pattern for failed add.
Attachments
msg14453 (view) Author: ganesh Date: 2011-05-21.21:46:34
I'm going to screen this, but as a preliminary review comment, I think 
this might be a bit extreme; often you want to add a whole directory of 
stuff and tolerate some failures. Might be worth a discussion on darcs-
users for use cases here (which should then be codified as tests).
msg14508 (view) Author: ganesh Date: 2011-06-08.21:41:14
Owen, do you think you could start the aforementioned discussion about how 
darcs add ought to behave?
msg14724 (view) Author: kowey Date: 2011-09-07.17:18:07
This looks fine, accepting pending tests.

It seems Darcs exits with failure if it detects that no adds were made.

On Sat, May 21, 2011 at 21:46:35 +0000, Ganesh Sittampalam wrote:
> I'm going to screen this, but as a preliminary review comment, I think 
> this might be a bit extreme; often you want to add a whole directory of 
> stuff and tolerate some failures. Might be worth a discussion on darcs-
> users for use cases here (which should then be codified as tests).

I've gone ahead and filed this as issue2100 and submitted patch674
as a test.

Prior to patch590, darcs was "relying" on an uncaught exception to
terminate darcs add when the first file does not exist.  Unfortunately,
I must have not run the full test suite and ended up costing the team
time and a logjam :-(

Basically, I think the situation looks like this:

darcs init
mkdir d
darcs add d/non-existent
# A: don't leave 'adddir d' lying around
# B: clean error message
touch d/f
darcs add d/non-existent d/f
# C: *do* add d and d/f

before   : A C
patch590 :  BC 
patch609 : AB
issue2100: ABC

-- 
Eric Kow <http://erickow.com>
History
Date User Action Args
2011-05-19 22:10:56owstcreate
2011-05-21 21:46:35ganeshsetmessages: + msg14453
2011-06-02 06:25:18ganeshsetstatus: needs-screening -> needs-review
2011-06-08 21:41:14ganeshsetstatus: needs-review -> review-in-progress
assignedto: owst
messages: + msg14508
2011-09-07 17:18:07koweysetmessages: + msg14724
2011-09-07 17:18:27koweysetstatus: review-in-progress -> accepted-pending-tests
assignedto: owst -> kowey
nosy: + kowey
2011-10-12 06:24:18ganeshsetstatus: accepted-pending-tests -> accepted