[darcs-users] Something strange with addfile and pending??

David Roundy droundy at abridgegame.org
Sun Jul 18 09:35:46 UTC 2004


On Sat, Jul 17, 2004 at 09:08:51PM +0200, Tommy Pettersson wrote:
> I wrote:
> > There are likely other ways, because I am sure I did never
> > unpull anything from my upstream darcs copy.
> 
> I did some more testing and found out that whenever a repo
> has a _darcs/patches/pending file, like an empty composite
> 
>   {
>   }
> 
> which seems to happen on several other occasions than unpull,
> any push or pull of an addfile patch will trigger the bug.
> If there is no _darcs/patches/pending, the push/pull works
> all right.

Thanks for tracking this down.  I think I've fixed this--it was pretty easy
to find the problem once I knew how to trigger it.  As a side-effect, I
found a place where the code was unnecesarily inefficient in pulls and
applies and fixed that.  :)

> I tried with some different _darcs/patches/pending
> setups: pending addfile, replace &c.  In all cases where
> _darcs/patches/pending exists, it is simply overwritten
> (former pending patches are destroyed) with the spurious
> patch that removes the contents of the added file.

This is actually a separate bug from the above (but related), so it's a
good thing you pointed it out! I fixed this also.  It just goes to show,
that one never can tell how many bugs one is introducing when one changes
any code!

I was a good boy this time, and added a test to the testsuite which would
trigger this bug.  Some day the test suite may be comprehensive enough to
keep me from adding bugs, at least to the commonly used commands...

Thanks again for tracking down this problem!
-- 
David Roundy
http://www.abridgegame.org




More information about the darcs-users mailing list