darcs

Issue 586 bug in darcs repair in darcs2

Title bug in darcs repair in darcs2
Priority urgent Status resolved
Milestone Resolved in
Superseder Nosy List darcs-devel, dmitry.kurochkin, ertai, kowey, thorkilnaur, tommy
Assigned To
Topics Darcs2

Created on 2008-01-14.16:20:51 by ertai, last changed 2009-10-24.00:05:33 by admin.

Messages
msg2477 (view) Author: ertai Date: 2008-01-14.16:20:49
$ darcs repair
Applying patch 7 of 7... done.
Fixing pristine tree...
darcs: bug in darcs!
HashedPristine is not implemented yet. at src/Darcs/Repository/Pristine.lhs:170
compiled Jan  7 2008 12:14:42
Please report this to bugs@darcs.net,
If possible include the output of 'darcs --exact-version'.

$ darcs --exact-version
darcs compiled on Jan 14 2008, at 16:30:07
# configured Fri Jan 11 15:44:10 CET 2008
./configure /opt/local/share/config.site /opt/local/etc/config.site

Context:

[resolve conflict.
David Roundy <droundy@darcs.net>**20080111160045] 

[Conflict backup files are boring.
Trent W. Buck <twb@cyber.com.au>**20080110163822] 

[more boring extensions
forge@dr.ea.ms**20080111142046
 Added extensions for CLISP, CMUCL, and "part" files which result in
 failed KDE copy operations.
] 

[resolve conflict in Libwww.
David Roundy <droundy@darcs.net>**20080110234609] 

[Some error reporting for libwww.
Dmitry Kurochkin <dmitry.kurochkin@gmail.com>**20080110221921] 

[add optional support for using the pure haskell Network.HTTP http implementation
John Meacham <john@repetae.net>**20080110215859] 

[make darcs-2 repositories store patches in more-nicely-formated format
David Roundy <droundy@darcs.net>**20080110220413] 

[fix filename encoding issue in ShowFiles.
David Roundy <droundy@darcs.net>**20080110204120] 

[add debug message when grabbing files using libcurl.
David Roundy <droundy@darcs.net>**20080110202200] 

[make using libwww no longer the default, even if it's present.
David Roundy <droundy@darcs.net>**20080110195753
 There is a bug in our libwww bindings that I haven't located... if it isn't
 fixed, we should definitely remove this binding before the darcs 2.0
 release.
] 

[make Libwww.copyUrls provide debug output.
David Roundy <droundy@darcs.net>**20080110195733] 

[Canonize Gwern Branwen, Nicolas Pouillard, Eric Kow.
Eric Kow <E.Y.Kow@brighton.ac.uk>**20080109152727] 

[Eliminate configure test for Text.PrettyPrint.
Eric Kow <E.Y.Kow@brighton.ac.uk>**20080109152927] 

[Use our own Printer instead of Text.PrettyPrint (make_changelog).
Eric Kow <E.Y.Kow@brighton.ac.uk>**20080109172910] 

[Add parens functionality to the printer code.
Eric Kow <E.Y.Kow@brighton.ac.uk>**20080109144956] 

[issue567: regression test for moving a file to the same location as itself
Mark Stosberg <mark@summersault.com>**20080109032346] 

[restore behavior where we display conflicts in --summary mode.
David Roundy <droundy@darcs.net>**20080110004605] 

[regression test for issue406
Mark Stosberg <mark@summersault.com>**20080109044500] 

[fix latex bug in docs.
David Roundy <droundy@darcs.net>**20080108211102] 

[fix latex bug in docs.
David Roundy <droundy@darcs.net>**20080108205912] 

[fix bug in show_tags.sh cleanup.
David Roundy <droundy@darcs.net>**20080108204430] 

[document the three repo format flags for "darcs init"
Mark Stosberg <mark@summersault.com>**20080108041024] 

[improve the one-paragraph docs for "darcs init"
Mark Stosberg <mark@summersault.com>**20080108040941] 

[Quit defining inventory format options recursively. Provide user-oriented
descriptions.
Mark Stosberg <mark@summersault.com>**20080108035256] 

[update partial.sh to show off improved darcs-2/partial functionality
Mark Stosberg <mark@summersault.com>**20080108024712] 

[typo and bug fix in partial.sh.
Mark Stosberg <mark@summersault.com>**20080108022808
 
 It turned out the call to "darcs optimize" was silently failing to create a
checkpoint
 because there was no tag. This caused the remaining tests for --partial to run
against 
 a full repo, not a partial one. 
] 

[issue55: document that darcs handles some types of binary files automatically. 
Mark Stosberg <mark@summersault.com>**20080108010043] 

[correct apparent typo in test.
Mark Stosberg <mark@summersault.com>**20080108005710
     The fix made more sense than the former behavior of comparing a file to
itself. 
] 

[test: Exibit a falling test about rollback.
nicolas.pouillard@gmail.com**20080107150224
 Indeed  the only test about rollback was br0ken by a prior test that creates a
 directory  and  remove  read  permissions  to  it.  The  rollback test do some
 records  that  silently  fail  by lack of permissions, finally the rollback is
 cancelled since the named patch doesn't exist.
 This shows that rollback need some care.
] 

[doc,typo: some s/darcs commit/darcs record/
nicolas.pouillard@gmail.com**20080107142702] 

[test: Add a test for darcs show tags.
nicolas.pouillard@gmail.com**20080107142628] 

[issue395: eliminate patches with a single character name from shell scripts in
the test suite.
Mark Stosberg <mark@summersault.com>**20080106051821] 

[prevent warning in test script and remove mysterious exit(1) call.
Mark Stosberg <mark@summersault.com>**20080106052622] 

[issue526: improve Perl test suite.
Mark Stosberg <mark@summersault.com>**20080106045548
     - better compatibility when path to darcs includes a space
     - better portability by eliminating some system calls
     - general style improvements
] 

[minor white-space and code style improvements
Mark Stosberg <mark@summersault.com>**20080105183641] 

[typo fix on GNUmakefile comment
Mark Stosberg <mark@summersault.com>**20080105183027] 

[refactor: improve style and portability of pull.pl test script.
Mark Stosberg <mark@summersault.com>**20080105181751
     Many direct system calls were eliminated. No functional changes.  
] 

[issue347 - document that single quotes should be used in .darcs/defaults
Mark Stosberg <mark@summersault.com>**20080101164428] 

[add feature requested in issue576.
David Roundy <droundy@darcs.net>**20080105150125] 

[fix bug in issue576.
David Roundy <droundy@darcs.net>**20080105144929] 

[add test that triggers bug in issue576.
David Roundy <droundy@darcs.net>**20080105144812] 

[Make sure we test the 'darcs' we just built and not one in a global path.
Mark Stosberg <mark@summersault.com>**20080102002235
     This done by using "$DARCS" instead of 'darcs'.
     However, in my case the updated test FAILS unexplainably with 2.0.0pre3,
     by failing to detect that a file has changed. 
     If I follow along in a shell and run the same commands with Darcs 2, 
     the problem does not appear. 
] 

[add configure support for libwww.
David Roundy <droundy@darcs.net>**20080104201255] 

[make bug message more explicit.
David Roundy <droundy@darcs.net>**20080104004253] 

[Initial implementation of HTTP pipelining using libwww.
Dmitry Kurochkin <dmitry.kurochkin@gmail.com>**20071222144902] 

[make indent slightly more concise using lines and unlines.
David Roundy <droundy@darcs.net>**20080104003953] 

[refactor: replace recursive indent with more concise find-and-replace syntax
Mark Stosberg <mark@summersault.com>**20080101200447] 

[simplify (and debug) pending handling.
David Roundy <droundy@darcs.net>**20071227133618
 Note that this change could lead to performance regressions, but I believe
 that these regressions would be strongly bounded (never worse than a
 whatsnew), and this simplification makes the code much easier to safely
 modify.
] 

[make updating of pending on pull much more efficient.
David Roundy <droundy@darcs.net>**20071224131059] 

[simplify a bit of code.
David Roundy <droundy@darcs.net>**20071224131023] 

[fix type-witness bug in HopefullyPrivate.
David Roundy <droundy@darcs.net>**20071223141149] 

[simplify Get
David Roundy <droundy@darcs.net>**20071223025108] 

[simplify tentativelyAddPatch by removing unused return value.
David Roundy <droundy@darcs.net>**20071223024400] 

[simplify away np2prims and nps2prims.
David Roundy <droundy@darcs.net>**20071223022145] 

[try to avoid rewriting patches that we've just read.
David Roundy <droundy@darcs.net>**20071222190029] 

[generalize CommandsAux utility functions.
David Roundy <droundy@darcs.net>**20071222162952] 

[add new instances for PatchInfoAnd.
David Roundy <droundy@darcs.net>**20071222144439] 

[change tentativelyAddPatch to accept a PatchInfoAnd p.
David Roundy <droundy@darcs.net>**20071222140517] 

[internal prepration for optimization saving patch writing.
David Roundy <droundy@darcs.net>**20071222134834] 

[add changelog entry.
David Roundy <droundy@darcs.net>**20071219162646] 

[add fixme indicating where the code could be simplified.
David Roundy <droundy@darcs.net>**20071221135649] 

[make reading of hashed inventories lazier.
David Roundy <droundy@darcs.net>**20071221133453] 

[resolve conflicts in mv_and_remove_tests.sh.
David Roundy <droundy@darcs.net>**20071219144638] 

[Fix !(...|...) in mv_and_remove_tests.sh.
Dave Love <fx@gnu.org>**20071218001826
 Assume the original construct should have been `! ... | ...' and
 replace with a portable version of that.
] 

[[issue571] Redo last HAVE_TERMIO_H fix.
Dave Love <fx@gnu.org>**20071218140508
 Not the most direct fix, but simpler.
] 

[Fix configure test for gadt type witnesses.
Dave Love <fx@gnu.org>**20071218120139] 

[use --ignore-times in all tests.
David Roundy <droundy@darcs.net>**20071217225159
 This is because the hashed repository is a bit pickier, in that
 it no longer checks file lengths when the file modification times
 match.
] 

[enable modification time checking on hashed repositories.
David Roundy <droundy@darcs.net>**20071217220237] 

[Pass two args to `cmp' in tests, following POSIX.
Dave Love <fx@gnu.org>**20071216180503
 Fixes some failures on Solaris.
] 

[resolve silly conflict with myself.
David Roundy <droundy@darcs.net>**20071217200855] 

[clean up SelectChanges (eliminating Bools)
David Roundy <droundy@darcs.net>**20071217191809] 

[make a few more files compile with type witnesses.
David Roundy <droundy@darcs.net>**20071217183234] 

[fix bug in revert (in writing the unrevert file).
David Roundy <droundy@darcs.net>**20071216215225] 

[make a few more files compile with type witnesses.
David Roundy <droundy@darcs.net>**20071217164815] 

[remove tabs.
David Roundy <droundy@darcs.net>**20071216224617] 

[bump version number preemptively to 2.0.0pre3.
David Roundy <droundy@darcs.net>**20071216222823] 

[fix doc bug in show contents.
David Roundy <droundy@darcs.net>**20071216214002] 

[TAG 2.0.0pre2
David Roundy <droundy@darcs.net>**20071216201647]
msg2481 (view) Author: daveroundy Date: 2008-01-14.20:31:51
Thanks for the  bug report!

Can you share how you managed to corrupt your pristine cache? As far
as I can see, this bug can only manifest itself when pristine is
corrupt, and if there's a second bug, I'd like to hear about it...

David
msg2482 (view) Author: daveroundy Date: 2008-01-14.20:32:01
Thanks for the  bug report!

Can you share how you managed to corrupt your pristine cache? As far
as I can see, this bug can only manifest itself when pristine is
corrupt, and if there's a second bug, I'd like to hear about it...

David
msg2483 (view) Author: droundy Date: 2008-01-14.20:57:50
I am pushing a fix for this right now.
msg2488 (view) Author: ertai Date: 2008-01-14.21:29:52
Indeed that's the case, but I can't reproduce it.

Basically here is the story...

1) I've  recorded something, some file hunks and two new files (addfile, then big
hunk) (note: I use --look-for-adds).

2) I've remarked that these two files where not completely correct.

3) I've changed these two files (on line differ), and amend-record the last patch.
I  found  strange  that  darcs  was showing me that he want to empty the file,
then removes it, then adds it, then full it with the new contents.

4) To be sure, I've looked to the recorded patch (darcs changes --last 1 -v).
Oh surprise there is two addfile for each file.

5) Then starts problems, unrecord impossible, so I've hacked my inventory, and
launched darcs repair.
msg2493 (view) Author: droundy Date: 2008-01-14.22:12:17
On Mon, Jan 14, 2008 at 09:29:54PM -0000, Nicolas Pouillard wrote:
> 
> Indeed that's the case, but I can't reproduce it.

Argh.   :(

> Basically here is the story...
> 
> 1) I've  recorded something, some file hunks and two new files (addfile, then big
> hunk) (note: I use --look-for-adds).
> 
> 2) I've remarked that these two files where not completely correct.
> 
> 3) I've changed these two files (on line differ), and amend-record the last patch.
> I  found  strange  that  darcs  was showing me that he want to empty the file,
> then removes it, then adds it, then full it with the new contents.
> 
> 4) To be sure, I've looked to the recorded patch (darcs changes --last 1 -v).
> Oh surprise there is two addfile for each file.

This sounds really serious.  I can only imagine that it relates to the use
of --look-for-adds.  Would you be willing to keep looking for a working
test case? I've tried what you describe above, and haven't been able to
reproduce this.  :(

Could it be that you began this process with an older version of darcs than
the one you finished it with (which you mention in your initial report)?
-- 
David Roundy
Department of Physics
Oregon State University
msg2494 (view) Author: droundy Date: 2008-01-14.22:12:30
On Mon, Jan 14, 2008 at 09:29:54PM -0000, Nicolas Pouillard wrote:
> 
> Indeed that's the case, but I can't reproduce it.

Argh.   :(

> Basically here is the story...
> 
> 1) I've  recorded something, some file hunks and two new files (addfile, then big
> hunk) (note: I use --look-for-adds).
> 
> 2) I've remarked that these two files where not completely correct.
> 
> 3) I've changed these two files (on line differ), and amend-record the last patch.
> I  found  strange  that  darcs  was showing me that he want to empty the file,
> then removes it, then adds it, then full it with the new contents.
> 
> 4) To be sure, I've looked to the recorded patch (darcs changes --last 1 -v).
> Oh surprise there is two addfile for each file.

This sounds really serious.  I can only imagine that it relates to the use
of --look-for-adds.  Would you be willing to keep looking for a working
test case? I've tried what you describe above, and haven't been able to
reproduce this.  :(

Could it be that you began this process with an older version of darcs than
the one you finished it with (which you mention in your initial report)?
-- 
David Roundy
Department of Physics
Oregon State University
msg2516 (view) Author: ertai Date: 2008-01-15.11:41:24
Don't seems completely fixed here:

$ darcs repair
Applying patch 7 of 7... done.
Fixing pristine tree...
darcs: _darcs/hashed_inventory: openBinaryFile: does not exist (No such file or
directory)

$ wc _darcs/hashed_inventory
29      77    1078 _darcs/hashed_inventory

Perhaps we're not in the right directory ?
msg2529 (view) Author: droundy Date: 2008-01-15.19:04:36
I've just pushed a fix for this, along with the test script.  Thanks again for
the bug report!
msg2531 (view) Author: droundy Date: 2008-01-15.19:38:48
I should correct my previous note, I got this issue confused with issue588.  I
did push a fix to this, but didn't note that it was contributed by ertai.  And
there isn't a test script for this bug (mostly because it's hard to get the
repository into a state requiring repair... although not impossible... a test
script would be appreciated).
History
Date User Action Args
2008-01-14 16:20:52ertaicreate
2008-01-14 20:31:54daveroundysetstatus: unread -> unknown
nosy: + daveroundy
messages: + msg2481
2008-01-14 20:32:02daveroundysetmessages: + msg2482
2008-01-14 20:58:02droundysetstatus: unknown -> resolved
messages: + msg2483
2008-01-14 21:29:55ertaisetstatus: resolved -> unread
messages: + msg2488
2008-01-14 22:12:23droundysetstatus: unread -> unknown
messages: + msg2493
2008-01-14 22:12:34droundysetmessages: + msg2494
2008-01-14 22:13:26droundysettitle: darcs repair broken in darcs2 -> pristine cache corruption in darcs2
2008-01-15 11:41:26ertaisetmessages: + msg2516
2008-01-15 19:04:41droundysetstatus: unknown -> resolved
messages: + msg2529
title: pristine cache corruption in darcs2 -> bug in darcs repair in darcs2
2008-01-15 19:38:50droundysetstatus: resolved -> unknown
messages: + msg2531
2008-01-15 19:41:45droundysetstatus: unknown -> resolved
2008-09-28 20:49:36adminsetnosy: + dagit, simon, thorkilnaur, - daveroundy
2009-08-06 17:32:53adminsetnosy: + markstos, jast, Serware, dmitry.kurochkin, darcs-devel, zooko, mornfall, - droundy, ertai
2009-08-06 20:30:18adminsetnosy: - beschmi
2009-08-10 22:10:44adminsetnosy: + ertai, - markstos, darcs-devel, zooko, jast, Serware, mornfall
2009-08-11 00:04:32adminsetnosy: - dagit
2009-08-25 17:26:11adminsetnosy: + darcs-devel, - simon
2009-08-27 13:52:42adminsetnosy: tommy, kowey, darcs-devel, thorkilnaur, ertai, dmitry.kurochkin
2009-10-23 22:40:35adminsetnosy: + nicolas.pouillard, - ertai
2009-10-24 00:05:33adminsetnosy: + ertai, - nicolas.pouillard