在本地停止/启动 svnserve
(在 Ubuntu 上开发)
我在本地安装 SVN 以跟踪我的项目直至其 1.0 版本。没什么特别的,因为我是唯一的开发人员,所以没有身份验证/SSH 等;与 webdav/httpd 等无关。只是一个普通的旧本地服务器实例!
我以前从未这样做过,所以我终于意识到,每当我想将任何代码提交到存储库时,我都必须手动启动和停止 svnserve。
我发现可以配置 inetd 将 svnserve 作为服务调度。基本上,inetd 监听您指定的端口,如果它检测到该端口上有任何 svn 流量,则启动 svnserve 并将命令传递给它;看起来 inetd 也会在不使用服务器时关闭服务器以节省内存。
是否有任何方法(inetd 或其他方式)将 svn 配置为在本地客户端尝试访问其存储库之一时启动,并在完成后自动关闭?
为了我的示例,此处是一些相关的 URL:
/usr/bin - svn、svnadmin 和 svnserve 都安装在其中
/opt/sandbox/svn/myProj - myProj 存储库的位置
来连接到服务器!
svn://opt/sandbox/svn/myProj
因此,客户端应该通过点击感谢您的任何想法
(Developing on Ubuntu)
I'm installing SVN locally to track my project up to its 1.0 release. Nothing fancy, as I am the sole developer, so no authentication/SSH, etc; nothing with webdav/httpd, etc. Just a plain old local server instance!
I've never done this before, so it finally dawned on me that I would have to manually start and stop svnserve anytime I want to commit any code to a repo.
I see that it is possible to configure inetd to dispatch svnserve as a service. Basically, inetd listens on a port you specify, and if it detects any svn traffic on that port, starts svnserve and passes the commands on to it; it looks like inetd also shuts down servers when they are not being used to conserve memory.
Any way, inetd or otherwise, to configure svn to start up when a local client tries to hit one of its repositories, and to shut back down automatically when it's done?
For the sake of my example, here are some pertinent URLs:
/usr/bin - where svn, svnadmin and svnserve are all installed
/opt/sandbox/svn/myProj - the location of myProj's repository
Thus the clients should be looking to connect to the server by hitting
svn://opt/sandbox/svn/myProj
Thanks for any ideas!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你不需要服务器。只需使用
file:///opt/sandbox/...
而不是svn://
访问存储库。它也更快。也就是说,Subversion 正在变老。 尝试 DVCS。它们的设置非常简单,并且稍后您共享项目所需的时间不会超过一分钟。
You don't need a server. Just access the repository with
file:///opt/sandbox/...
instead ofsvn://
. It's faster, too.That said, Subversion is getting old. Try a DVCS. They are as easy to set up and it won't take you more than a minute to share your project later.