[svk-devel] Need help merging two SVN repostories with SVK
Eric
clevnull at yahoo.com
Thu Oct 11 18:01:48 EDT 2007
Dear Christophe,
Many thanks for your advice. I didn't know that there are some catches in using SVK/SVN:mirrror and it looks like automating the merging process with SVN hooks is not a good idea after all. I will test the mechanism your described and then let developers try it out. Eventually, we'll need to have someone to perform code merging on daily bases. That is actually something we tried to aviod but automtic code merging is near impossible with SVK/SVK.
Thanks again,
Eric
Christophe Guillon <guillonc at free.fr> wrote:
Dear "dev null",
I use the scenario 2 (* see below) that you mention to mirror two distant repositories that are contributed on both side as you describe.
It works.
But... there are some problems that you may want to be aware of. In particular I experienced:
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.
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.
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).
Thus as soon as you use SVK to mirror back and forth repositories, you end up with repositories that are not equivalent and sometime you can have hard time correcting things.
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.
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.
For the scenario you describe, and in particular point 4, I use a slightly different mechanism:
>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.
> svk sync //primary
> svk sync //secondary
> svk smerge --log --incremental --baseless //secondary //primary
I do not use --baseless (unless for the very first smerge). I guess it would avoid you the first batch of empty merges.
Thus after the first synchro from //primary to //secondary and then from //secondary to //primary, I use:
update //secondary:
svk sync //primary
svk sync //secondary
svk smerge --incremental //primary //secondary
update //primary:
svk sync //primary
svk sync //secondary
svk smerge --incremental //secondary //primary
Regards,
-- C.Guillon
----- Original Message -----
From: dev null
To: svk-devel at bestpractical.com
Sent: Thursday, October 04, 2007 8:34 PM
Subject: [svk-devel] Need help merging two SVN repostories with SVK
Hi,
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:
Scenario #1:
1) First location hosts primary SVN repository (svn://primary-repos/)
2) Second location mirrors the primary repository with SVK and makes a local copy.
svk mirror svn://primary-repos/ //mirror
svk sync //mirror
svk cp -m "Create a local branch" //mirror //local
3) Developers at the second location work on SVK branch(//local) using SVN clients. But then according to SVKTool webpage, it indicates that there are consequences when using SVN clients on a SVK depot. Therefore this scenario will not work.
Scenario #2:
1) Second location hosts the secondary SVN repository (svn://secondary-repos/).
2) First location hosts the primary SVN repository (svn://primary-repos/) On the same server, SVK mirrors the primary repository and the secondary repository.
svk mirror svn://primary-repos/ //primary
svk sync //primary # This repos contains all the source codes
svk mirror svn://secondary-repos/ //secondary
svk sync //secondary # This repos is completely empty at the moment
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.
svk smerge --log --incremental --baseless //primary //secondary
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.
svk sync //primary
svk sync //secondary
svk smerge --log --incremental --baseless //secondary //primary
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.
Thanks,
Eric
---------------------------------
Pinpoint customers who are looking for what you sell.
---------------------------------
_______________________________________________
svk-devel mailing list
svk-devel at bestpractical.com
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/svk-devel
_______________________________________________
svk-devel mailing list
svk-devel at bestpractical.com
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/svk-devel
---------------------------------
Tonight's top picks. What will you watch tonight? Preview the hottest shows on Yahoo! TV.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.bestpractical.com/pipermail/svk-devel/attachments/20071011/f6cda8e8/attachment-0001.htm
More information about the svk-devel
mailing list