how to share svn repository between two computers

青春壹個敷衍的年華 提交于 2020-01-04 11:40:14

问题


On my workstation I have SVN repository. I use it on both workstation and laptop. On workstation I can access repository locally, but on laptop I have to be internet-connected to access repository. This is not convenient, because I can not work from plane/trains and other internet-less places (i want to compare revisions etc etc.).

It would be much more comfortable to have the COPY of the svn repository on laptop, but I need up to date copy.

The most trivial solution would be to store svn repository in cloud like https://www.dropbox.com so anytime repository is updated on one computer it would be updated on another computer.

But I do not want to use dropbox because of security reasons, I don't want to store confidential files somewhere in internet, and likely unencrypted.

What else can I do? I want to synchronize two copies of repository automatically, but I do not want to store it in internet. Probably laptop itself every time internet appears should "get" up to date copy from workstation and every time repository is updated on laptop it should commit new revision to workstation automatically?

I understand that SVN is not designed to do such things, but as I am the only commiter to repository and I only have workstation and laptop we can assume that conflict never occurs...


回答1:


Move over to a distributed version control system like git or Mercurial. Subversion is made to have one central repository in one place. Trying to replicate the repo itself would mean a great risk of data loss or inconsitencies.




回答2:


Why you not try source code hosting like bitbucket ? They have private repositories too.




回答3:


If you are really dead-set on keeping a copy of your repository in two places (which, as others have pointed out, is strange, but it's your life), you could always encrypt your repository locally after each commit and put that up on dropbox. Whenever you need to switch to your laptop, just grab the dropbox version and unencrypt it. I guess you would have to keep overwriting your repositories in each location each time you do an update, but otherwise, it seems to do what you want.



来源:https://stackoverflow.com/questions/9962884/how-to-share-svn-repository-between-two-computers

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