Git 或 Hg 或任何现代 VCS 中的 WebDAV 自动版本控制
我最近刚刚了解到 SVN 针对 WebDAV 的自动版本控制功能。虽然我知道这并不能替代正确的版本控制,但它带有记录更改集的消息,但它让我觉得它是 Dropbox 的可靠且安全的替代品(减去漂亮的 GUI 和网页)。然而,由于自动版本控制的提交很频繁,我想 Git 或 Hg 会更适合于此,只是因为它们的数据库更紧凑(尽管我想知道事物的分布式性质是否会使自动化难以解决冲突)。
据任何人所知,这是一个使用 Git 或 Hg 实现的功能吗?
I just recently learned of SVN's auto-versioning feature for WebDAV. Although I understand this is not replacement for proper versioning, with messages documenting change sets, it strikes me as a solid and safe replacement to Dropbox (minus nice GUIs and web pages). However, since commits in auto-versioning are frequent, I'd imagine that Git or Hg would be better suited for this, just because of their more compact databases (although I wonder if the distributed nature of things could make the automation ugly for resolving conflicts).
Is this a feature that has been implemented using Git or Hg, as far as anyone knows?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
市场上有一个解决此问题的选项:
WsgiDAV 是一个 python WebDAV 服务器,提供各种后端包括 DVCS Mercurial,以及其他一些后端时尚商店(couchdb、mongodb、MySQL、App Engine)。请注意,当前版本声称“这不是生产代码”。
它的版本控制似乎与 SVN 的 WebDAV、自动版本控制不同,允许您一次提交包含多个更新的变更集(通过从“编辑”文件夹拖动到“已发布”文件夹等,而 SVN+WebDAV 的自动版本控制会创建太多提交,从而创建一个所以它不是完全自动版本控制,但它不需要命令行访问,并且在我
看来是一个更好的模型......我不推荐自动提交 WebDAV+。正如你所说,“自动版本控制的提交很频繁”,但它们非常频繁,而且通常毫无意义,
我自己的解决方案是在我的服务器上运行 git 或 Mercurial 存储库,并使用 cron-。定期对其进行版本更改,虽然丑陋,但功能齐全,并且不需要特殊的服务器设置/不需要特殊的 apache 模块/等等,更好的是,我可以通过 WebDAV、SFTP 或 Windows/Apple 文件共享访问所述存储库。本地 DVCS 镜像,根据我的需要,它们都可以无缝工作。
例如,Git 具有相当好的文件移动检测功能,因此这减少了对 WebDAV 访问本身的需求。然而,如果在 SVN 签出中移动目录而不通过访问层(将其转换为 svn mv 命令),则可能会导致可怕的损坏。 AFAICT,WebDAV+SVN 的主要好处是它可以防止您以这种方式破坏自己的结帐。
另一方面,在这种情况下,git 或 Mercurial 的“紧凑数据库”并不是选择它们而不是 SVN 的真正原因。然而,如果您正在考虑必须处理真正的同步冲突,我会推荐它们中的任何一个而不是颠覆,因为它们具有卓越的冲突解决能力和一般较低的麻烦/灵活性。
There is one option on the market for this problem:
WsgiDAV is a python WebDAV server that offers a variety of backends including the DVCS mercurial, plus some other fashionable stores (couchdb, mongodb, MySQL, App Engine). Note the current version claims "This is not production code."
It seems to different versioning than SVN's WebDAV, autoversioning, allowing you to commit changesets consisting of multiple updates at once (by dragging from "edit" to "released" folders and so, whereas SVN+WebDAV's autoversioning creates far too many commits, creating a version per-change. So it's not quite wholly auto-versioning, but it does not require command-line access, and is IMO a superior model.
Thinking about this more generally... I don't recommend the auto-commit WebDAV+SVN thing at all. As you say, "commits in auto-versioning are frequent". But they are so very frequent, and usually meaningless.
My own solution is to run a git or mercurial repository on my server, and use a cron-job to version changes to it at regular intervals. Ugly, but functional, and requires no special server setup/no special apache modules/etc. Better yet, I can access said repository over WebDAV, or SFTP or a windows/apple fileshare, or local DVCS mirror, depending on my needs, and they all work seamlessly.
Git, for example, has quite good file-move detection, so this reduces the need for WebDAV access per se. Whereas if one moves a directory in an SVN checkout without going through an access layer which translates this to a
svn mv
command, then horrible corruption can result. AFAICT, the chief benefit of WebDAV+SVN is that it prevents you from breaking your own checkout in this way.On the other hand, the "compact databases" of git or mercurial are not a real reason to prefer them over SVN in this case. However, if you are looking at having to deal with real sync conflicts, I would recommend either of them over subversion for their superior conflict resolution and general lower level of fuss/flexibility.
除了 SVN 之外,似乎还没有人为其他 VCS 编写自动版本控制。由于 WebDAV/DeltaV 支持是在 SVN 服务器中实现的,因此不可能将 VCS 切换到 SVN 以外的其他服务器。
几乎所有 DVCS 都可以进行普通 WebDAV 访问,但它们只能访问 WebDAV 客户端的存储库以及 DVCS 自己的客户端的推送操作,但不能进行自动版本控制。
一些链接以了解更多信息:
It seems that nobody has yet written autoversioning for other VCSs than SVN. As the WebDAV/DeltaV support is implemented in SVN server, it is not possible to just switch the VCS to other than SVN.
Plain WebDAV access is possible with pretty much all DVCS'es, but they enable only accessing the repository for WebDAV clients and push operations for the DVCS' own client, but no autoversioning.
Some links to read more about: