[darcs-users] darcs, lost in space

David Roundy droundy at abridgegame.org
Sat Feb 19 13:09:44 UTC 2005


On Fri, Feb 18, 2005 at 06:44:29PM -0500, Michael Conrad wrote:
> On Fri, Feb 18, 2005 at 07:59:13AM -0500, David Roundy wrote:
> > On Thu, Feb 17, 2005 at 01:59:22AM -0500, Michael Conrad wrote:
> > > Meanwhile the repair finishes.  Happily, all my working files are as
> > > they should be, and darcs whatsnew reports "No Changes".  So that
> > > looks good.  However, when I run "darcs changes" to see my patch list,
> > > darcs takes almost 3 minutes to display the list.  I look at my patch
> > > files again, and the mergers are still there.
> > 
> > You've had a conflict (I can't tell when) and presumably haven't resolved
> > it.  I could try taking a look at your repositories--often I can guess what
> > happened better from the repository than from users' descriptions! :)
> > 
> > But basically, my guess is that you had the conflict before you even ran
> > "get" to grab the fresh copy.  darcs 1.0.2 won't let you run a push that
> > would cause a conflict, but earlier versions of darcs will merrily do so.
> > So presumably some time in the past someone (you?) pushed conflicting
> > patches, which have never been resolved.  When you run "get" conflicts
> > aren't marked.  If you had run "pull", the conflicts would have been
> > noticed and announced.
> > 
> > Running a darcs get from the server followed by a darcs resolve (and then
> > whatsnew) may clarify the situation.
> 
> Ok, mystery solved, though it wasn't what I expected.  Somehow, when I
> pulled the repo to my laptop the inventory file didn't get written, or
> something.  However, the patches did get copied and applied and current
> was successfully created.
> 
> I was able to record changes in the repo because darcs had current to work
> with.  However, I just tried annotate and it doesn't recognize that the
> original files are part of the repo.

Okay, your repository at this stage was in serious corruption land, as you
were recording invalid patches...

> When I pushed my new patches, the context of the current repo was only the
> list of my 5 new patches, and so somewhere darcs assumed that the entire
> contents of the original two patches were in conflict.
> 
> (How does darcs resolve the fact that my first new patch deletes content
> that supposedly never existed?  i.e. none of my new patches could be
> applied to an empty repo.)
> 
> I tried to reproduce the sequence of events, but the inventory is getting
> properly written now and everything is working just fine.
> 
> Anyway, I've racked my brain to remember anything that might have caused
> this, but nothing comes to mind.  I should mention that the sub-repo hack
> I'm using ends up with the parent version-controlling the inventory file of
> the child... but I still don't see what I would have done to cause that to
> kick in.

I'm guessing that this was the problem.  Having a parent
version-controlling the inventory files of subrepositories is just asking
for the subrepositories to be corrupted--and the symptoms would be just
what you describe--when there's a conflict, patches would tend to get
dropped from the inventory, while changes would still be made to
_darcs/current, resulting in a corrupt subrepository.

And I should note that if you had two patches in a different order on two
copies of the subrepository, that would create a conflict in the inventory
file, so you'd be pretty much guaranteed with this kind of a subrepository
system to sooner or later get a conflict in the inventory file, provided
you have any kind of a moderately interesting development topology.

Basically, you don't want *any* program messing with the contents of
_darcs/ (except possibly _darcs/prefs), or you're liable to get corruption.
This includes darcs itself, except in the case where darcs is acting on
behalf of that repository itself.
-- 
David Roundy
http://www.darcs.net




More information about the darcs-users mailing list