[darcs-users] Data loss bug when renaming and replacing a non standard token?

Ashley Moran ashley.moran at patchspace.co.uk
Sun Mar 22 19:11:55 UTC 2009

On 22 Mar 2009, at 18:55, Eric Kow wrote:

> Sorry to hear that.
> When you say data loss, are you referring to stuff in his/her working
> directory that was lost?

Hi Eric

Yes, he lost the text he added at the end of the file.  From my  
example, it's equivalent to:

Given %r/something else/ do

> If not, you can recover the original data by unpulling one of the
> conflicting patches

Think I understand you - the data had not been recorded, so it was  
truly lost.  I assume an un-pull could not recover data in this case?

>> Fortunately it was really minor (a few lines), but very
>> suprising behaviour.  It happens when pulling a patch that renames  
>> a file
>> AND replaces a token with the token chars '[%r/]'.  Darcs says  
>> there is a
>> conflict, but does not create a backup file with the existing data.
>> Is this is a bug, or are we abusing `darcs replace`?  (Or both?)
> So to make sure I'm on the same page: are you referring specifically
> to the failure to back up a file in the presence of a conflict?

Yes.  I would possibly have to double check I've remembered what I did  
(I've closed the terminal window), but I've simulated it without a  
replace operation, and with a replace operation that uses standard  
tokens, and with a replace operation that doesn't need forcing.

> Please submit a report to bugs at darcs.net, and also create a test case
> for our bugs/ directory and darcs send it (since you *almost* have  
> one!
> :-D).  One thing that may be worth checking is if the use of darcs
> replace is a red herring, and if a mv conflict suffices to trigger  
> this
> situation, or perhaps a mv with any other sort of conflict.

Hmm, can I forward the original email to that address?

I'd happy to create a test case and examine all the possible  
permutations, but right now I have barely a minute spare, and it could  
be a couple of weeks before I get round to it.  At a risk of sounding  
lazy, can I leave it with the darcs team for now, and if nobody gets  
chance to look at it, pick it up when I'm less busy?



More information about the darcs-users mailing list