Synchronizing code with two subversion repositories

匿名 (未验证) 提交于 2019-12-03 09:18:39

问题:

Searching here I found that this question was already asked, but I think my situation is worse!-(

I'm a total novice with Internet repositories development. A book I'm reading contains an interesting sample project - a social network in ASP.Net. The author put the code as a CodePlex project. I tried to "get" the version through VisualSVN (subversion) but failed. So what I did was download the code as a zip file (i.e. disconnected from the project's repository), created my own local repository, and started modifying the code.

Now the CodePlex's respository started becoming active. What I'd like to do is to continously get the changes from the CodePlex repository to my local one, and occasionally commit some of my changes back to the CodePlex repository.

Is it doable?

回答1:

What I actually did, at least for now and as long as the traffic for the CodePlex project is low:

I downloaded the current CodePlex 22875 release (as a zip). Luckily, before I started playing with the project, I'd saved the original 16202 zip file locally on my computer (but I think I could also have gotten it from CodePlex).

Now I have two folders on my computer: 22875 and 16202. What I did was use Total Commander to compare the two trees and find out which files were modified. And I manually integrated the few changes into my code.

I think Beyond Compare would have been even better with the integration, but I'm not yet familiar with it so I stuck with TC.

To go the other direction I think I'd have to check out the current CodePlex trunk, integrate my changes manually, and commit the changes.

What can I say - it sucks. But my volume of changes is such that a local repository makes much more sense than working with the CodePlex one. And as CodePlex uses SVN, I enjoy working locally with SVN, I've just shelled $49 for VisualSVN, and I'm afraid of the git Unix hacker :-)



回答2:

Not with basic SVN, as it considers each respository separate and does not allow merging across repos. Then you'd have to merge manually. This is probably a pain.

Note: I missed your first line in the question.. doh.. I'd already written all of this.. bah.. hope it helps slightly anyway.. :)

As you see in the other questions, there is a new thing called DVCS (distributed version control systems) that allow several repos to exist and allows for pushing/pulling commits back and forth. There are a few popular versions, Git, Mercurial and Bazaar.

Git is a bit difficult to use, IMO, but it supports bridging to svn-repositories pretty well.

There are a few new things to learn when moving to a distributed form, since the datamodel by defintion is more complex. I don't know if it is for you, but it does support what you're asking.

To apply this, you would use your own local Git repo, import different svn repos as local branches in that repo. Then merge changes from these branches into your main development branch, change and commit stuff there (locally) and finally merge your changes to either or both of the svn-branches, then push the svn-branches in Git to the svn-repositories as new commits.

However, Git is made by and for Linux kernel hackers. Be warned. :)

Mercurial is a bit more user friendly, but it's svn-support is, from what I've heard, not as good. Haven't tried it myself though.



回答3:

As mentioned before, across repositories won't work.

Back to the initial problem, have you tried a checkout from the original repository with svn command line?

From the directory you want to have the working copy: svn checkout svn://codeplex_repository

Then copy your modifications and synchronize as usual with svn using update/commit.

If not familiar with svn command line, download TortoiseSVN, is free and does the job.



回答4:

you can look of the solution described here ... i am looking in implementing a same strategy, and after reading left and right i am leaning to use SVK. Heres an example of synk using svk.



易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!