darcs

Issue 1674 darcs check wrongly reports that it's fixing remove non-empty error

Title darcs check wrongly reports that it's fixing remove non-empty error
Priority bug Status given-up
Milestone Resolved in
Superseder Nosy List alain91, attila.lendvai, darcs-devel, dmitry.kurochkin, gphilip, jaredj, kowey
Assigned To
Topics ProbablyEasy, UI

Created on 2009-11-04.14:24:56 by kowey, last changed 2017-07-31.01:57:38 by gh.

Messages
msg9196 (view) Author: attila.lendvai Date: 2009-11-04.13:59:05
$ darcs repair
WARNING: Fixing removal of non-empty file ./swank-openmcl.lisp    
WARNING: Fixing removal of non-empty file ./test-all.sh

Writing out repaired patches...                                
Fixing pristine tree...
$ darcs repair
WARNING: Fixing removal of non-empty file ./swank-openmcl.lisp       
WARNING: Fixing removal of non-empty file ./test-all.sh

Writing out repaired patches...
Fixing pristine tree...
$ darcs check
WARNING: Fixing removal of non-empty file ./swank-openmcl.lisp       
WARNING: Fixing removal of non-empty file ./test-all.sh

Looks like we have a difference...
Nothing                                                              

Inconsistent repository!
Found broken patches.



the darcs2 repo is available at:

http://dwim.hu/darcsweb/darcsweb.cgi?r=HEAD%20slime;a=summary
http://dwim.hu/darcs/slime/


notes:
 - darcs check prints: "WARNING: Fixing..."
 - darcs repair issued twice after each other prints the same (so, fails to fix)
msg9199 (view) Author: kowey Date: 2009-11-04.14:24:51
Splitting this from issue1673: we need to differentiate the message for darcs
check/repair so it doesn't sound like darcs check is actually doing something. 
I doubt this will be very hard to fix
msg13626 (view) Author: gphilip Date: 2011-02-04.19:27:10
I tried to replicate this bug, and failed.

To replicate this, I checked out the latest version of darcs and built
it, and then checked out the latest version of slime from
http://dwim.hu/darcs/slime/ . I then ran the following commands, with
the results given below:

slime$ darcs --version
2.5 (+ 546 patches)

slime$ darcs repair
The repository is already consistent, no changes made.

slime$ darcs check                               
The repository is consistent!

Thus it seems to me that the behaviour reported by the OP does not
occur. Does this mean that the bug is no longer there, or should I be
doing something different to replicate it?

(I am quite new to Haskell.)
msg13695 (view) Author: kowey Date: 2011-02-17.11:30:48
Well, it's odd that darcs 2.7 doesn't seem to complain of any error.  I 
don't want to speculate on what's going on with the repository.  I can 
say that it does not occur with darcs 2.3.1, 2.4.3, or 2.5.0; so I'll 
guess that the version that's up online is the fixed repository.

Meanwhile, *this* particular ticket (split from its cousin) is really 
just about the error reporting.

So I think the main task at hand is to look into the code to find out if 
darcs check is [A] fixing something when it shouldn't be, or [B] 
hopefully just erroneously reporting that it's doing so

There's also another task, come to think of it, which isn't so easy.
We ideally need some sort of minimal test case with a deliberately 
broken repository (one that has a rmfile patch on a non-empty file).  I 
can't think of any easy way to generate such a repository (it sounds 
like hashed repositories would make it super-tedious to hand-edit a 
patch).  Maybe there's one lying around in tests/, or somebody on darcs-
devel can help you make one.
msg13698 (view) Author: attila.lendvai Date: 2011-02-17.12:08:41
indeed, i may have forgotten about this report and fixed the repo.

luckily i had a backup with the problem, now available at:

http://dwim.hu/static/home/darcs-repo-for-issue-1674.tgz
msg18386 (view) Author: alain91 Date: 2015-04-30.07:51:52
2012-03-24 Guillaume Hoffmann
make check an alias for repair –dry-run

I hope this could be an answer about what check does.
History
Date User Action Args
2009-11-04 14:24:56koweycreate
2009-11-04 14:25:45adminsetmessages: + msg9196
2011-02-04 19:27:12gphilipsetnosy: + gphilip
messages: + msg13626
2011-02-17 11:30:50koweysetmessages: + msg13695
2011-02-17 12:08:42attila.lendvaisetmessages: + msg13698
2015-04-30 07:51:54alain91setmessages: + msg18386
2015-04-30 07:52:45alain91setstatus: needs-implementation -> deferred
2015-04-30 07:58:05alain91setassignedto: alain91
nosy: + alain91
2015-05-23 18:47:39alain91setassignedto: alain91 ->
2017-07-31 01:57:38ghsetstatus: deferred -> given-up