svn 和断开连接的编辑
我正在使用 svn(VisualSVN Server,特别是 VisualSVN,因此是 TortoiseSVN)。是否可以在离线场景下工作?例如代码签入,然后修改解决方案而不签出相关文件?
什么(如果有的话)会出错?
I am using svn (VisualSVN Server in specific with VisualSVN and thus TortoiseSVN). Is it possible to work in an offline scenario? E.g. code is checked in, and then modify the solution without checking out the relevant file?
What (if anything) will go wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以通过 file:// 使用本地存储库离线工作。首先,您需要创建本地存储库,与远程同步,然后将工作目录切换到本地存储库,经过一些工作后,您可以将它们同步回远程并将工作目录切换回远程。 此处对此进行了描述。
You can work offline with local repository through file://. First you need to create local repo, sync with remote, then switch working dir to the local repo, after some work you can sync them back with remote and switch working dir back to remote. This is described here.
您可以继续工作,但是...
当您未连接到存储库时,某些 svn 操作仍然可以完成。例如 - svn diff,要查看本地更改,svn st。这是可能的,因为当您签出时,svn 将每个签出文件的副本保存在 .svn 中。
无法完成需要访问存储库的操作 - 例如 svn commit。
You can continue working, but ...
Some svn actions still can be completed while you're not connected to repo. For example - svn diff, to see your local changes, svn st. This is possible since while you checkout, svn save copy of each checkout file in .svn.
Actions that require access to repo can not be accomplished - e.g. svn commit.
不可以,SVN 需要访问集中式服务器。您无法将提交离线排队以便稍后传输到服务器。
您可能会通过分布式版本控制系统(例如Mercurial 或 Git。它们允许您像已连接一样离线工作,然后在最终连接时同步您的更改。
No, SVN requires access to a centralized server. You cannot queue up commits offline for later transmission to the server.
You may find what you need with a distributed version control system such as Mercurial or Git. They allow you to work offline as if you were connected, and then synch your changes when you eventually connect.