darcs

Patch 2033 resolve issue2001: repair fails to detect missing pris...

Title resolve issue2001: repair fails to detect missing pris...
Superseder Nosy List bf
Related Issues
Status accepted Assigned To
Milestone

Created on 2020-06-21.21:04:29 by bf, last changed 2020-07-21.20:36:55 by bf.

Files
File name Status Uploaded Type Edit Remove
patch-preview.txt bf, 2020-06-21.21:04:28 text/x-darcs-patch
resolve-issue2001_-repair-fails-to-detect-missing-pristine-files.dpatch bf, 2020-06-21.21:04:28 application/x-darcs-patch
unnamed bf, 2020-06-21.21:04:28 text/plain
See mailing list archives for discussion on individual patches.
Messages
msg22102 (view) Author: bf Date: 2020-06-21.21:04:28
1 patch for repository http://darcs.net/screened:

patch d752f3184369f082e4bd4889351d8405074206f1
Author: Ben Franksen <ben.franksen@online.de>
Date:   Sun Jun 21 22:00:53 CEST 2020
  * resolve issue2001: repair fails to detect missing pristine files
  
  The trick is to call darcsUpdateHashes after reading the pristine tree. This
  makes it fail when there are missing pristine files.
Attachments
msg22181 (view) Author: ganesh Date: 2020-07-19.00:19:09
Makes sense - a test case would be nice, but not required.
msg22220 (view) Author: bf Date: 2020-07-20.13:07:33
> Makes sense - a test case would be nice, but not required.

When I tried to add a test for this I found that the fix is not
complete. It works for files, but when I remove a hashed file that
corresponds to a subdirectory I get no complaints form darcs check and
darcs repair silently re-creates the file but tells us the repo is
already consistent and no changes were made. I'll have to investigate
why the simple fix seems to work for files but not for directories.
msg22231 (view) Author: bf Date: 2020-07-21.20:36:54
Testing this more systematically revealed that repair can fail to detect
missing hashed files, regardless of whether theyr represent directories
or files.

I will send a new patch with a test and the final fix in another ticket
because this one has already been accepted.
History
Date User Action Args
2020-06-21 21:04:29bfcreate
2020-06-21 21:32:03bfsetstatus: needs-screening -> needs-review
2020-07-19 00:19:09ganeshsetstatus: needs-review -> accepted-pending-tests
messages: + msg22181
2020-07-19 09:05:12ganeshsetstatus: accepted-pending-tests -> accepted
2020-07-20 13:07:34bfsetmessages: + msg22220
2020-07-21 20:36:55bfsetmessages: + msg22231