我可以在两个SVN存储库中有一个项目吗? [英] Can I have one project in two SVN repositories?

查看:74
本文介绍了我可以在两个SVN存储库中有一个项目吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的I.T.部门不允许从实际办公室外部连接到SVN服务器。 (他们就是这样。)我不在办公室时需要开展项目。



我可以检查项目并等待直到我进入办理登机手续。也许这将是最好的。但我喜欢经常入住。我想知道是否有某种方法可以将项目保存在两个存储库中,并使它们保持最新状态。这样我总是可以在某些地方检查以防万一我的HD死亡。我在VPS服务器上有自己的资料库,用于个人项目。



我调查了 svn switch 命令。使用我目前在两个回购项目中的项目,我尝试将我的工作副本从个人切换到工作SVN服务器......



$ $ $ s $ switch $ - -relocate svn + ssh://personalvps.com/svn/project/trunk svn:// worksvn / project / trunk
svn:'svn:// worksvn / project / trunk'的存储库有uuid'2baef97e -42ce-488c-bbba-c2625158c643',但WC有'f13e1f32-dc92-4c4a-b84d-34a59fe32063'

然后我尝试添加 - 用户名 - 密码参数,但得到一个错误,



这甚至可能或完全不切实际吗?




更新



感谢您的回答。不幸的是,任何涉及I.T. (轻微的政策改变,改变某个地方的设置,安装一些东西)不在桌面上。我必须在当前的设置中找到一个解决方案,除了我们的Web服务器之外,这个解决方案没有外部连接。



我会看看分布式版本控制。 p>

解决方案

作为最后的努力,您总是可以用SSH在公司防火墙上打个洞。看看ssh隧道(也可以想一想,在防火墙上打个洞也许是一个很好的搜索术语)。我想你会想要-L或-R ssh选项,但是我不记得哪个或哪些是正确的。如果你正在运行windows,如果你先安装Cygwin,仍然可以使用相同的技术。


$ b 编辑:对不起,我没有对此如何工作更加清楚。你想要的选项是-R。它在远程机器上打开一个端口(用于收听)。当某些东西连接到远程计算机上的端口时,连接将通过SSH连接返回到本地计算机,然后转发到本地网络中您选择的服务器。在晚上用SSH离开之前,您可以通过工作计算机连接到家庭计算机以打开隧道。然后,当你在家工作时,你设置你的SVN工作副本(使用 svn switch --relocate )指向你的家用电脑。顺便说一句,如果您正在运行svnserve守护进程,SVN端口默认为3690.


Our I.T. dept doesn't allow connections to the SVN server from outside the physical office. (They're just kind of like that.) I need to work on projects when I'm not at the office.

I could just check out the project and wait until I come in to do a check-in. Maybe that would be best. But I like to check in frequently. I'm wondering if there's some way I can keep a project in two repositories and keep them both up to date. That way I'd always be able to check in somewhere in case my HD dies. I have my own repository on a VPS server that I use for personal projects.

I investigated the svn switch command. With my current project in both repos I tried switching my working copy from personal to work SVN servers...

$ svn switch --relocate svn+ssh://personalvps.com/svn/project/trunk svn://worksvn/project/trunk
svn: The repository at 'svn://worksvn/project/trunk' has uuid '2baef97e-42ce-488c-bbba-c2625158c643', but the WC has 'f13e1f32-dc92-4c4a-b84d-34a59fe32063'

Then I tried adding the --username and --password params but got an error saying "no entry found."

Is this even possible or is it totally impractical?


UPDATE

Thanks for the answers. Unfortunately, any solution that involves action from I.T. (slight policy change, change a setting somewhere, install something) is not on the table. I have to find a solution within the current setup, which is no connections from outside except our Web servers.

I'll take a look at distributed version control.

解决方案

As a last-ditch effort, you can always poke a hole in your corporate firewall with SSH. Look into "ssh tunnels" (and also, come to think of it, "poke a hole in the firewall" might be a good search term too). I think you'll want either the -L or -R ssh option, but I can't recall which or even if they're the right ones for sure. And if you're running windows, it's still possible to use the same exact technique if you install Cygwin first.

EDIT: Sorry I wasn't more clear on how this works. The option you want is -R. It opens a port on the remote machine (for listening). When something connects to that port on the remote machine, the connection travels back down the SSH connection to the local machine, then is fowarded on to the server of your choice in the local network. You could connect to your home computer from your work computer before you leave at night with SSH to open the tunnel. Then when you're working from home, you set your SVN working copy (using svn switch --relocate) to point at your home computer. BTW, the SVN port is 3690 by default, if you're running the svnserve daemon.

这篇关于我可以在两个SVN存储库中有一个项目吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆