darcs

Issue 2294 darcs annotate fails to include some lines when patch index is enabled.

Title darcs annotate fails to include some lines when patch index is enabled.
Priority urgent Status needs-testcase
Milestone 2.10.0 Resolved in
Superseder Nosy List bsrkaditya, ganesh, markstos
Assigned To bsrkaditya
Topics PatchIndex

Created on 2013-01-24.20:23:48 by markstos, last changed 2013-02-17.13:37:57 by bsrkaditya.

Files
File name Uploaded Type Edit Remove
patch-index-update-correctness.sh bsrkaditya, 2013-02-17.13:37:56 application/x-shellscript
Messages
msg16555 (view) Author: markstos Date: 2013-01-24.20:23:45
1. Summarise the issue (what were doing, what went wrong?)

I was running "darcs annotate filename.txt".  I noticed the line I was looking 
for was not present in the output!

2. What behaviour were you expecting instead?

I expected all the lines in the file to be present in darcs annotate output.

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

  2.9.7 (+ 35 patches)

4. What operating system are you running?
  
Ubuntu Linux 10.04.

I repeated the command after running "darcs optimize --disable-patch-index". 

When I did that, the line re-appeared, pinpointing it as a patch-index issue.

Sorry, I don't how exactly the patch index failed and the repo is not 
available. Before I disabled "patch index", I did run these commands:

darcs show patch-index-status
darcs show patch-index-test

It claimed that the Index was to date and passing it's tests. 

I can say that the missing lines recently entered my repo through another repo 
via the "pull" command.

Now, I'll try to rebuild the patch index and see if the problem is still 
there. 

###
After waiting a bit, I see darcs has run out of stack space. 

I look up the incantation to address that, and try again.

Oh, I see that I have to re-compile darcs to run the incantation to re-
optimize darcs to fix the patch index to re-run my command. What a pain. 

(Side note: It would be great if the stack space issues could go away). 

###

I've re-compiled, re-optimized and re-tested now, with darcs 2.9.7+35. The 
result is that... the line is back now.

So, re-building the patch index fixed the issue somehow.
msg16558 (view) Author: ganesh Date: 2013-01-27.14:00:02
It ought to be impossible to get annotate output that omits some lines, no 
matter how badly messed up the patch index is.

I think the main action from this bug given that we don't have a repro 
case is to review the code to make sure that's the case.
msg16590 (view) Author: bsrkaditya Date: 2013-02-15.11:24:36
This suggests that there is some bug in patch index update. As I 
recall, patch index has been tested across multiple repositories, 
immediately after patch index creation.
 I will write a shell script that will apply each patch of a given repo 
one by one, and test for accuracy of patch index changes. With this we 
might be able to identify the bug.
msg16683 (view) Author: bsrkaditya Date: 2013-02-17.13:37:56
I have tried to see if I could get patch index to trip, but no luck. I 
have tried this for the screened repository. I am attaching the shell 
script with which I tested this.
 Maybe others will have more luck with it.
Attachments
History
Date User Action Args
2013-01-24 20:23:48markstoscreate
2013-01-27 14:00:06ganeshsetnosy: + ganesh
messages: + msg16558
2013-01-27 14:00:13ganeshsetmilestone: 2.10.0
2013-02-15 11:24:37bsrkadityasetstatus: unknown -> needs-testcase
assignedto: bsrkaditya
messages: + msg16590
nosy: + bsrkaditya
2013-02-17 13:37:57bsrkadityasetfiles: + patch-index-update-correctness.sh
messages: + msg16683