<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16525" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Dear "dev null",</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I use the scenario 2 (* see below) that you mention
to mirror two distant repositories that are contributed on both side as you
describe.</FONT></DIV>
<DIV><FONT face=Arial size=2>It works.</FONT></DIV>
<DIV><FONT face=Arial size=2>But... there are some problems that you may want to
be aware of. In particular I experienced:</FONT></DIV>
<DIV><FONT face=Arial size=2>1. problem with sync, some repositories revisions
simply can't be sync due to pending SVK/SVN:Mirror problems. This is a problem
that may block you to mirror the entire repository history. It's ok until you
see the problem.</FONT></DIV>
<DIV><FONT face=Arial size=2>2. problem with smerge. On some particular
scenarios, for instance a directory copy followed by a deletion of some
files/directory inthe same commit, smerge does not properly replay the commit.
This is silent, the symptom is that the two repositories diverged, and on the
//secondary you have "undeleted" files for instance.</FONT></DIV>
<DIV><FONT face=Arial size=2>3. when you have conflicts on a merge, you have to
resolve it with a lot of care as every of your commit will then be mirror back
to the other side, potentially creating conflicts again, in this case it is very
"easy" to make the repositories diverge (i.e. you end with apparently
synchronized repositories, but the files are different).</FONT></DIV>
<DIV><FONT face=Arial size=2> </FONT></DIV>
<DIV><FONT face=Arial size=2>Thus as soon as you use SVK to mirror back and
forth repositories, you end up with </FONT> <FONT face=Arial
size=2>repositories that are not equivalent and sometime you can have hard time
correcting things. </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>If you have a lot of developements on both side,
you should be aware that you can not fully guarantee an equivalence of the
repositories.</FONT></DIV>
<DIV><FONT face=Arial size=2>Though, if you have for instance most branch
creations and merge activity on one side only, the //primary for instance, it is
ok. It is the way I use it.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>For the scenario you describe, and in particular
point 4, I use a slightly different mechanism:</FONT></DIV>
<DIV><FONT face=Arial size=2>>4) There is problem when SVK merges code
changes from //secondary back to //primary. It merge every revision
starting with revision 2. The process took couple >hours and all of
them are empty merges except for the last two.<BR>>
svk sync //primary<BR>> svk sync
//secondary<BR>> svk smerge --log --incremental --baseless
//secondary //primary<BR>I do not use --baseless (unless for the very
first smerge). I guess it would avoid you the first batch of empty
merges. </FONT></DIV>
<DIV><FONT face=Arial size=2>Thus after the first synchro from //primary to
//secondary and then from //secondary to //primary, I use:</FONT></DIV>
<DIV><FONT face=Arial size=2>update //secondary:</FONT></DIV>
<DIV><FONT face=Arial size=2> svk sync //primary</FONT></DIV>
<DIV><FONT face=Arial size=2> svk sync //secondary</FONT></DIV>
<DIV><FONT face=Arial size=2> svk smerge --incremental //primary
//secondary</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>update //primary:</FONT></DIV>
<DIV><FONT face=Arial size=2> svk sync //primary</FONT></DIV>
<DIV><FONT face=Arial size=2> svk sync //secondary</FONT></DIV>
<DIV><FONT face=Arial size=2> svk smerge --incremental //secondary
//primary</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> Regards,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> -- C.Guillon</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=clevnull@yahoo.com href="mailto:clevnull@yahoo.com">dev null</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=svk-devel@bestpractical.com
href="mailto:svk-devel@bestpractical.com">svk-devel@bestpractical.com</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, October 04, 2007 8:34
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [svk-devel] Need help merging
two SVN repostories with SVK</DIV>
<DIV><BR></DIV>
<DIV>Hi,</DIV>
<DIV> </DIV>
<DIV>I need help to figure out the proper way to setup SVK to keep two SVN
repositories in sync. Currently, we have one group of developers working
from the primary SVN repository using SVN clients. There will be
another group of developers that will be working on the same
project at another location and they will prefer to use
SVN clients too. Therefore, my goal is to maintain two
identical SVN repositories with the help of SVK. I've been testing the
following setup scenarios:</DIV>
<DIV> </DIV>
<DIV>Scenario #1:</DIV>
<DIV>1) First location hosts primary SVN repository
(svn://primary-repos/)</DIV>
<DIV>2) Second location mirrors the primary repository with SVK
and makes a local copy.</DIV>
<DIV> svk mirror svn://primary-repos/
//mirror<BR> svk sync //mirror</DIV>
<DIV> svk cp -m "Create a local branch" //mirror
//local</DIV>
<DIV>3) Developers at the second location work on SVK branch(//local) using
SVN clients. But then according to <A
href="http://svk.bestpractical.com/view/SVKTools">SVKTool webpage</A>, it
indicates that there are consequences when using SVN clients on a SVK
depot. Therefore this scenario will not work.</DIV>
<DIV> </DIV>
<DIV>Scenario #2:</DIV>
<DIV>1) Second location hosts the secondary SVN repository
(svn://secondary-repos/).</DIV>
<DIV>2) First location hosts the primary SVN repository
(svn://primary-repos/) On the same server, SVK mirrors the primary
repository and the secondary repository.</DIV>
<DIV> svk mirror svn://primary-repos/ //primary</DIV>
<DIV> svk sync
//primary #
This repos contains all the source codes</DIV>
<DIV> svk mirror svn://secondary-repos/ //secondary</DIV>
<DIV> svk sync
//secondary # This repos
is completely empty at the moment</DIV>
<DIV>3) SVK merges the code from //primary to //secondary and it went
well. The primary SVN repos and the secondary SVN repos are indentical
now.</DIV>
<DIV> svk smerge --log --incremental --baseless //primary
//secondary</DIV>
<DIV>4) There is problem when SVK merges code changes from //secondary back to
//primary. It merge every revision starting with revision 2.
The process took couple hours and all of them are empty merges except for the
last two.</DIV>
<DIV> svk sync //primary</DIV>
<DIV> svk sync //secondary</DIV>
<DIV> svk smerge --log --incremental --baseless //secondary
//primary</DIV>
<DIV> </DIV>
<DIV>Is scenario #2 the proper setup for the job? If so, is there a way or svk
command that can make merging between two mirrors happen faster? because i'm
thinking of using SVN hooks to trigger SVK merging on every
user commit. Any advice will be greatly appreciated and
i'm so sorry the long post.</DIV>
<DIV> </DIV>
<DIV>Thanks,</DIV>
<DIV>Eric</DIV>
<P>
<HR SIZE=1>
<A
href="http://us.rd.yahoo.com/evt=48250/*http://searchmarketing.yahoo.com/arp/sponsoredsearch_v9.php?o=US2226&cmp=Yahoo&ctv=AprNI&s=Y&s2=EM&b=50">Pinpoint
customers </A>who are looking for what you sell.
<P>
<HR>
<P></P>_______________________________________________<BR>svk-devel mailing
list<BR>svk-devel@bestpractical.com<BR>http://lists.bestpractical.com/cgi-bin/mailman/listinfo/svk-devel<BR></BLOCKQUOTE></BODY></HTML>