On Sat, Nov 12, 2005 at 02:04:21PM +0100, Daniel Bünzli wrote:
> The wiki tells me [1] that one should not synchronize '_darcs'  
> directories with unison. I don't see why this is a problem and I  
> would really like to do that (to know why see long version below).  
> Can anybody explain me what the problem is ? After all, what is under  
> '_darcs' is just a bunch of files.

AFAIK the author of that comment is wrong. It's possible to get repo
corruption with Unison, but rsync and cp are quite safe (though you
probably want rsync -a --delete). Provided the repo isn't in use, of
course.

I sync repos with Unison every day without problems. The golden rule
is to always sync the entire _darcs directory in one direction.  If
you've pulled different patches into the two copies of the repo and
then try to merge them, you'll probably end up with corruption. Apart
from that, it should be fine.

If you've recorded patches in both repos and also have unrecorded
changes, things are harder, as it's difficult to satisfy both Darcs
and Unison that there are no conflicts. This should work, though be
wary of files that are not (yet) managed by Darcs:

- 'darcs record -am TEMP && darcs push -a RepoB' in RepoA
- 'darcs unrecord -p TEMP' in RepoB

Now all the changes from RepoA are in ReopB, so:

- 'unison -force RepoB RepoB RepoA'

(And yes, the above gives a hint on how to move unrecorded changes
with just Darcs - finish by unpulling from RepoA - but I find the
Unison approach easier for the usual case.)

-- Jamie Webb

_______________________________________________
darcs-users mailing list
[email protected]
http://www.abridgegame.org/mailman/listinfo/darcs-users

Reply via email to