如何使用 SVN 管理我的 Firefox 扩展项目?
我正在使用 SVN 来管理我的 Firefox 扩展项目,该项目包含一个 XPCOM 组件。 Firefox 直接从我的工作目录加载,方法是在我的用户配置文件的 ./extensions 目录中放置一个带有工作目录路径的文本文件。当 Firefox 启动时,我的扩展无法加载并且无法加载。覆盖;检查错误控制台,我发现错误指出“.svn 无法作为组件加载” - 对插件结构的“components”目录内的 .svn 目录的引用。有没有办法让 Firefox 忽略这个目录,或者让 SVN 生成一个没有 .svn 目录的工作副本?
I'm using SVN to manage my Firefox extension project, and this project contains an XPCOM component. Firefox is loading directly from my working directory by placing a text file with the working directory's path in the ./extensions directory of my user profile. When Firefox starts, my extension fails to load & overlay; examining the Error Console, I see that the error states that ".svn cannot be loaded as a component" - a reference to the .svn directory inside my "components" directory of the plug-in structure. Is there any way to get Firefox to ignore this directory, or get SVN to generate a working copy without the .svn directories in it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我唯一建议的是您创建一些构建脚本,将您的文件(无 .svn)部署到您的 Firefox 扩展文件夹中。并不理想,但您应该能够将一些只需要几秒钟即可运行并可以通过快捷键触发的东西组合在一起(或者为了奖励积分,通过监视工作副本中的文件,并在它们出现时更新您的 Firefox 文件夹)已保存)
The only thing I suggest is that you create some build scripts that deploy your files (sans .svn) into your firefox extensions folder. Not ideal, but you should be able to put something together that only takes a few seconds to run and can be triggered by shortcut key (or for bonus points, by monitoring the files in your working copy, and updating your firefox folder whenever they get saved)
可能......
不。这就是 SVN 的工作原理。这些目录存储 svn 的 canges 和元信息。需要它们才能从 WC 进行提交。
Possibly...
No. This is how SVN works. these directories store the canges and meta information for svn. They are needed in order to do a commit from your WC.
现在提出这一建议可能为时已晚,但使用 Mercurial 不会遇到任何这些问题,因为根文件夹中有一个目录 -
.hg
- 而不是像下面那样混乱的 .svn 目录与颠覆。其他好处包括通过 .hgignore 进行适当的文件忽略、没有神秘的配置文件(用户主目录中的一个)、重命名处理和许多其他更好的功能。Bitbucket 提供免费托管。
It may be too late to suggest this, but you won't suffer any of these problems with Mercurial as you have one directory in the root folder -
.hg
- instead of the mess of .svn directories as with Subversion. Other benefits include decent file ignores via .hgignore, no mysterious config files (one in your user home directory), rename handling and a host of other better features.Bitbucket provide free hosting.
使用 svn export 命令对不包含 .svn 目录的工作副本进行(不可重新提交)签出。
Use the
svn export
command to make a (non-recommitable) checkout of your working copy that doesn't include .svn directories.