darcs

Issue 2256 diff/whatsnew: Unexpected failure in updateIndex! when they perform no action

Title diff/whatsnew: Unexpected failure in updateIndex! when they perform no action
Priority bug Status needs-testcase
Milestone Resolved in
Superseder Nosy List ganesh, owst
Assigned To
Topics PatchIndex

Created on 2012-10-17.00:04:51 by owst, last changed 2013-02-16.13:48:35 by gh.

Messages
msg16242 (view) Author: owst Date: 2012-10-17.00:04:50
1. Summarise the issue (what were doing, what went wrong?)

this is two apostrophes with nothing between them

$ darcs diff ''

darcs failed:  Unexpected failure in updateIndex!

2. What behaviour were you expecting instead?

No failure!

3. What darcs version are you using? (Try: darcs --exact-version)

2.9.5

4. What operating system are you running?
  
Ubuntu X86_64
msg16379 (view) Author: markstos Date: 2012-11-21.20:38:06
I triggered the same issue with darcs 2.9.6, by running "darcs whatsnew" on a 
non-existent file path:

$ darcs w /perllib/Role/REST/
Ignoring non-repository paths: /perllib/Role/REST/

Why would either of these operations trigger an index update anyway, since 
neither modifies data? That seems like a pessimization.
msg16510 (view) Author: ganesh Date: 2012-12-29.22:51:22
It's a bit of a tricky question, whether read-only commands should update 
caches like the [file] index and the patch index. I think they probably 
should, but they need to be tolerant of failure.
msg16616 (view) Author: kowey Date: 2013-02-16.08:26:39
Minimal test case please
msg16627 (view) Author: gh Date: 2013-02-16.13:48:34
This bug also happens in 2.8.4 (compiled with ghc 7.6) with both:
    darcs diff ''
    darcs w ''
History
Date User Action Args
2012-10-17 00:04:51owstcreate
2012-10-17 00:05:02owstsettitle: `darcs diff ''` from command line fails -> `darcs diff ''` fails
2012-11-21 20:38:08markstossettopic: + PatchIndex
messages: + msg16379
title: `darcs diff ''` fails -> darcs diff && darcs whatnews can fail with " Unexpected failure in updateIndex! " when they perform no action
2012-12-29 22:51:23ganeshsetnosy: + ganesh
messages: + msg16510
2013-02-16 08:26:40koweysetpriority: bug
status: unknown -> needs-testcase
messages: + msg16616
title: darcs diff && darcs whatnews can fail with " Unexpected failure in updateIndex! " when they perform no action -> diff/whatsnew: Unexpected failure in updateIndex! when they perform no action
2013-02-16 13:48:35ghsetmessages: + msg16627