[darcs-users] Distributed conflicts?

Daan Leijen daan at cs.uu.nl
Sat Nov 13 12:56:01 UTC 2004


Hi all,

Playing with Darcs, I noticed a potential weakness of distributed 
version management.
I want to set up a "main" darcs repository, with several developer 
hacking away on
specific features. Every once in a while they commit (push) their 
changes and everyone
can update (pull) to see the changes other people make. This is how most 
CVS project
work and it is good model parallel development.

Of course, Darcs should be better at this model as it supports merges 
much better than
CVS, right? Well almost -- the problem is that when I push my changes to 
the main
repository it will happily apply patches that conflict -- leaving the 
merge conflicts in the
files on the main repository (effectively distributing my merge 
conflicts). With CVS this
can never happen as  CVS forces to "update" before being able to commit. 
The pull
would force the developer to solve the conflicts locally.

I guess that there are a few ways to solve this problem in Darcs:

1) use "--test" where tests would fail on merge conflicts.  I don't like 
this at all, as I do
not want to setup a test framework to make this safe.

2) use the cvs model: enforce that the local repo equals the main repo 
before being able
to push.  This is an easy solution, but it is somewhat against the 
spirit of decentralized
developmen. Furthermore, one gets trouble when there are too many 
commits (as in
100's per hour).

3) do not push patches that result in conflicts by default (ask for 
confirmation?). I like
this solution the most.  This would show the confilicting patches to the 
developer who
can pull those patches and resolve them locally only if necessary. This 
allows everyone
to work in parallel without ever having merge conflicts on the main 
repository. I think that
this should be the default, with a flag that allows you to get the 
current behaviour (--force-merge)

Well, I am interested to hear what people think about this. Right now, I 
am somewhat amazed
by the dual nature of "distributed" version management. It seems 
actually less parallel in practice
as many projects get a central maintainer of the main repository that 
actually applies patches and
resolves conflicts (like Linux and, ahem, darcs itsself ;-).  In this 
sense, centralized systems like svn
and cvs are more parallel, as everyone can commit and resolve conflicts 
locally. In the end, I think that
Darcs can be a real "winner" when it is able to support the centralized 
cvs model really well, while using
the distributed patch technology  !

Cheers,
  Daan.





More information about the darcs-users mailing list