简体   繁体   English

如何使用SVN管理Firefox扩展项目?

[英]How can I use SVN to manage my Firefox Extension project?

I'm using SVN to manage my Firefox extension project, and this project contains an XPCOM component. 我正在使用SVN管理我的Firefox扩展项目,并且该项目包含一个XPCOM组件。 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. Firefox通过将带有工作目录路径的文本文件放置在用户配置文件的./extensions目录中,直接从我的工作目录中加载。 When Firefox starts, my extension fails to load & overlay; 当Firefox启动时,我的扩展程序无法加载和覆盖; 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. 检查错误控制台后,我看到错误指出“ .svn无法作为组件加载”-对插件结构的“ components”目录中的.svn目录的引用。 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? 有什么方法可以使Firefox忽略该目录,或者使SVN生成不包含.svn目录的工作副本?

Is there any way to get Firefox to ignore this directory 有什么办法让Firefox忽略此目录

Possibly... 可能...

or get SVN to generate a working copy without the .svn directories in it 或获取SVN以生成不带.svn目录的工作副本

No. This is how SVN works. 否。这就是SVN的工作方式。 these directories store the canges and meta information for svn. 这些目录存储svn的cange和元信息。 They are needed in order to do a commit from your WC. 为了从您的WC进行提交,需要它们。

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. 建议这样做可能为时已晚,但是Mercurial不会遇到这些问题,因为您在根文件夹中有一个目录.hg而不是像Subversion那样混乱的.svn目录。 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. 其他好处包括通过.hgignore忽略了体面的文件,没有任何神秘的配置文件(用户主目录中的一个),重命名处理以及许多其他更好的功能。

Bitbucket provide free hosting. Bitbucket提供免费托管。

The only thing I suggest is that you create some build scripts that deploy your files (sans .svn) into your firefox extensions folder. 我建议的唯一事情就是创建一些构建脚本,将文件(sans .svn)部署到firefox扩展文件夹中。 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) 这并不理想,但是您应该能够将它们放在一起,只需几秒钟即可运行,并且可以通过快捷键来触发(或者为了获得加分,可以通过监视工作副本中的文件,并在每次获得Firefox文件夹时更新它们)已保存)

使用svn export命令对不包含.svn目录的工作副本进行(不可提交)签出。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM