适用于 Delphi 的 Subversion 专属签出和 Subversion 插件
目前SVN中是否有允许独占结账的功能?
Delphi有没有好的插件可以通过IDE访问?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
目前SVN中是否有允许独占结账的功能?
Delphi有没有好的插件可以通过IDE访问?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(7)
SVN 有一个“锁定”的概念,大致对应到专属结帐处。 例如,在 TortoiseSVN 中,这是通过“获取锁定”和“释放锁定”菜单项公开的。
JCL 包含一个 SVN 版本控制专家,它工作得很好。 除此之外,tt 还允许您从 IDE 访问锁定功能。
SVN has a concept of "locking" which roughly corresponds to the exclusive checkout. For example, in TortoiseSVN this is exposed via Get lock and Release lock menu entries.
JCL contains a SVN version control expert which works quite fine. Besides other things, tt gives you access to the locking functionality from the IDE.
TortoiseSVN 可以是 添加到 Delphi 工具菜单。 我自己没有尝试过,因为我很高兴将它用作资源管理器扩展。
关于独家结帐,我猜您的意思是一次只有一个人可以编辑它? 这并不是 Subversion 背后的真正想法,这个想法是你有工作副本,然后检查你的更改。 然后它会尝试合并您的更改(这通常在大多数情况下都有效)。 如果存在冲突,您需要手动解决它们。
TortoiseSVN can be added into the Delphi tools menu. I've not tried this myself, since I'm happy using it as an Explorer extension.
Regarding the exclusive checkout, I'm guessing you mean so only one person can edit it at a time? That's not really the idea behind Subversion, the idea is you have working copies and then check in your changes. It'll then try to merge your changes in (this usually works most of the time). If there are conflicts you'll need to resolve them manually.
我相信人们有时询问 Subversion 存储库中锁定项目的原因之一是因为他们将 Delphi DFM 以二进制格式保存,这使得提交/合并出现问题。
将 DFM 等更改为文本的替代方法是使用 Scooter Software 的 Beyond Compare。
Beyond Compare 是用 Delphi 编写的,并且本身就知道如何读取二进制 DFM。 这意味着无论您的 DFM 以二进制还是文本形式存储在 Subversion 中,都不再是问题(甚至没有问题)。 Beyond Compare V3 还进行 3 路合并,这使得合并多个提交等变得非常容易。即使忽略比较二进制 DFM 的能力,它仍然是比 TortoiseSVN 的内置工具更好的比较查看器。 我强烈推荐它,而且非常便宜。
目前,我在存储库中锁定的唯一内容是 COM 类型库(*.tlb 及其关联的 *_TLB.pas 文件)。
I believe one of the reasons why people sometimes enquire about locking items in a Subversion repository is because they have their Delphi DFMs saved in a binary format, which makes committing/merging problematic.
An alternative to changing DFMs etc to text is use Scooter Software's Beyond Compare.
Beyond Compare is written in Delphi, and natively knows how to read binary DFMs. This means that it then becomes less of an issue (or even no issue) whether your DFMs are stored in Subversion in binary or text. Beyond Compare V3 also does 3-way merging which makes it really easy to merge multiple commits etc. Even ignoring the ability to diff binary DFMs, it's still a much better diff viewer than TortoiseSVN's built-in tools. I can highly recommend it, and it's very inexpensive.
Currently the only things that I lock in our repository are COM type libraries (*.tlb and their associated *_TLB.pas files).
关于独家结账。 这是可以做到的,但是很痛苦并且通常不值得花时间。 如果您确实将 dfms 保存为二进制,请将它们转换为文本。
关于delphi插件,我在Delphi插件中发表了一篇文章颠覆。
我使用 jedi jcl 和 TortoiseSvn.
还有 Delphi svn 和 Tortoise svn 的 Delphi 插件。
Regarding exclusive checkouts. It can be done, but it's a pain and generally not worth the time. If you do have dfms saved as binary, convert them to text.
Regarding delphi addins, I have a post at Delphi addins for subversion.
I use the jedi jcl, and TortoiseSvn.
There are also Delphi svn and Delphi addin in for Tortoise svn that I know of.
也许我很天真,但为什么有人愿意费尽心思去合并他们的更改呢? 如果程序员正在编辑内容易于理解的文本文件,那么合并可能是一件简单的事情,因此可以通过程序员了解更改的含义来合并文本文件。 然而,如果您将 SVN 与 MS Visual Studio 一起使用,对一个文件的更改经常会导致对您不知道的其他文件的更改,并且程序员可能完全不知道这些文件中的信息编码(因此他们会不知道如何解释(更不用说合并这些文件),甚至可能是二进制文件,为什么要冒着让多人同时编辑内容的巨大麻烦和风险呢?
锁定范例很简单。 一次只有一个人进行编辑。 永远不需要合并。 程序员不需要知道他们甚至没有意识到自己正在修改的文件(可能是二进制)的编码。 没有人可以践踏别人的改变。 锁定(即默认锁定)听起来对我来说更可取。
Maybe I'm naive, but why would anyone want to go to the enormous trouble of merging their changes? Merging might be a simple matter if programmers were editing text files whose contents are easily understood, and which therefore could be merged by virtue of the programmers knowing the meanings of the changes. However if you're using SVN with MS Visual Studio, where changes to one file frequently case changes to other files you didn't know about, and where the encoding of information in such files may be completely unknown to the programmers (who would therefore have no concept of how to interpret much less merge such files) and may even be binary, why would you go to the enormous trouble and risk of having multiple people simultaneously editing things?
The locking paradigm is simple. Only one person edits at a time. Merging is never required. Programmers don't need to know the encodings of (possibly binary) files that they don't even realize that they're modifying. Nobody can stomp on anyone else's changes. Locking (i.e. locking by default) sounds much preferable to me.
“独家结帐”是什么意思? 你的意思是,你退房后,其他人就不能退房了?
这就是所谓的锁,subversion 可以做到这一点(请参阅锁定),尽管一般不建议这样做,因为版本控制的目的是允许多人同时处理版本化项目。
What do you mean by "exclusive checkout"? Do you mean that after you check out, nobody else can check out?
That's called a lock and subversion can do this (see Locking), though it's not recommended in general as the purpose of version control is to allow multiple people to simultaneously work on the versioned item.
第一部分,我使用的是Visual Source Safe,它支持锁定(使用前必须检查),SVN有锁定命令,但这违背了它的概念,你需要很少的时间来使用它,而且你永远不会使用它再次执行锁定命令。
对于问题的第二部分,TortoiseSVN 可以用作外部工具,或者您可以将其与与 Delphi 2007 及更高版本捆绑在一起的文件浏览器一起使用,并且您可以使用 IBrowser 适用于旧版本。
和 Delphi 的 Subversion 插件 总结Delphi IDE 的可用 SVN 插件,以及商业产品 SourceConneXion 。
For first part, I was using Visual Source Safe which is support locking (you have to check out before use), SVN has locking command, but it's against it's concept, you need few time to get used with it, and you will never use the locking command again.
For second part of your question, The TortoiseSVN can be used as external tool, or you can get it working with File Browser bundled with Delphi 2007 and above, and you can use IBrowser which work with older versions.
and Subversion add-ins for Delphi summarize the available SVN plug-ins for Delphi IDE, beside SourceConneXion which is commercial product.