[darcs-users] darcs, lost in space

Michael Conrad conradme at email.uc.edu
Fri Feb 18 23:44:29 UTC 2005


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.

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.

In short, I don't think this is a bug, just a wierd mistake that exploded
on me.  I'm not sure if there's anything that darcs could have done to
prevent this.

> > So here's my question: does darcs have any provision for REMOVING
> > mergers from patch files during a repair?  I'm kind of expecting not,
> > and that even if I put a latest version of darcs on my server that
> > it won't help until I can get those mergers out of the patch files...
> 
> No, the mergers are there marking a conflict that happened.  Repairing
> the repository doesn't modify the history, it just fixes _darcs/current
> to make sure it's consistent with the history.  If you want to eliminate
> the merges, you have to unrecord the patches.

So I guess the thing to do is unpull the patches, fix the inventory file
on the laptop-side, and re-push.

Something seems vaguely wrong about ending up with different patches
generated on the receiving end just because of the context on the
sending end.  Something about the patches not being immutable between
branches...  it might have been nice if patches would get copied
verbatim and then have a new merger patch file generated which
resolves any conflicts.  Then the merger could be deleted and
re-generated without affecting the data.  This would break the theory
of mergers, but it seems to be giving us a lot of trouble anyway ;-)

-Mike








More information about the darcs-users mailing list