Excel VBA SVN 客户端/集成
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/261902/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Excel VBA SVN Client / Integration
提问by Barry-Jon
Can anyone recommend an SVN client for use in Excel with VBA (code modules only). Ideally, I would also like SVN to ignore case when diffing prior to committing changes so as to avoid excessive churn in the repository (VBA has an annoying habit of changing the case of variables all over the project).
任何人都可以推荐一个 SVN 客户端在带有 VBA 的 Excel 中使用(仅限代码模块)。理想情况下,我还希望 SVN 在提交更改之前在差异时忽略大小写,以避免存储库中的过度流失(VBA 有一个讨厌的习惯,即在整个项目中更改变量的大小写)。
采纳答案by Ken Gentle
TortoiseSVNintegrates well with the Windows File Explorer and allows for the integration of an external diff tool (like Beyond Compare.
TortoiseSVN与 Windows 文件资源管理器很好地集成,并允许集成外部差异工具(如Beyond Compare.
Beyond Comparehas a specific plugin for Visual Basic code that appears to ignore case for 'unimportant text', meaning anything notin quotes.
Beyond Compare有一个特定的 Visual Basic 代码插件,它似乎忽略了“不重要的文本”的大小写,这意味着任何不在引号中的内容。
I don't think this will solve the SVN churn issue, however. I don't believe that SVN uses the external diff program to decide whether a file has changed prior to committing, and I don't know of any way to override this behavior.
但是,我认为这不会解决 SVN 流失问题。我不相信 SVN 在提交之前使用外部 diff 程序来确定文件是否已更改,我不知道有什么方法可以覆盖这种行为。
回答by neuwirthe
http://www.codeproject.com/KB/office/SourceTools.aspxmight do what you want
http://www.codeproject.com/KB/office/SourceTools.aspx可能会做你想做的
回答by fastzombies
Wow, my search for Excel VBA SVN led me to a 9 year old thread. So I guess I'll update.
哇,我对 Excel VBA SVN 的搜索使我找到了一个 9 岁的线程。所以我想我会更新的。
The msofficesvn above (moved to sourceforge/github) is the best svn option I have found but hasn't been updated in 2 years and it only manages entire documents. The OP and myself are looking for control of individual bas files.
上面的 msofficesvn(移至 sourceforge/github)是我发现的最好的 svn 选项,但已经 2 年没有更新了,它只管理整个文档。OP 和我自己正在寻找对单个 bas 文件的控制。
I recently started using Rubberduckwhich is an Excel VBA git interface that manages the tricky export/import to/from your git repo. It is currently supported and, while a bit tricky, works.
我最近开始使用Rubberduck,它是一个 Excel VBA git 界面,用于管理与 git 存储库之间的棘手导出/导入。它目前受支持,虽然有点棘手,但有效。
My org not only forces the use of Windows it is kinda resistant to git and is lingering with SVN, but I don't think there is an Excel VBA SVN tool so will quietly stick with Rubberduck. I hope this helps someone else.
我的组织不仅强制使用 Windows,它对 git 有点抵抗,并且一直在使用 SVN,但我认为没有 Excel VBA SVN 工具,所以会悄悄地坚持使用 Rubberduck。我希望这对其他人有帮助。
UPDATE: As I've spent more time on Excel VBA I've realized you don't absolutely need Rubberduck. You can get by with just git for Windows. You will, however, need to carefully manage the export/remove/import yourself. This may be preferable as I have found that if you do anything with Rubberduck outside of very basic add and commit functions, very unhappy things happen to your modules. Trying to check out a new branch sends you back to your initial commit and overwrites all your modules. Close Excel first, do your git operations, then reopen Excel and reopen your repo in Rubberduck.
更新:随着我在 Excel VBA 上花费更多时间,我意识到您并不绝对需要 Rubberduck。你可以只使用 git for Windows。但是,您需要自己仔细管理导出/删除/导入。这可能更可取,因为我发现如果您在非常基本的添加和提交功能之外对 Rubberduck 执行任何操作,您的模块会发生非常不愉快的事情。尝试签出一个新分支会让你回到你的初始提交并覆盖你所有的模块。首先关闭 Excel,执行 git 操作,然后重新打开 Excel 并在 Rubberduck 中重新打开您的存储库。
If you do want to manage yourself but want menus and forms, there is TortiseGITand TortiseSVNwhich integrate into Windows Explorer.
如果您确实想要管理自己但想要菜单和表单,则可以使用集成到 Windows 资源管理器中的TortiseGIT和TortiseSVN。
回答by Niketya
Have a look at the following applications.
看看下面的应用程序。
http://officesvn.codeplex.com/
http://officesvn.codeplex.com/