views:

45

answers:

4

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?

A: 

Is there any way to get Firefox to ignore this directory

Possibly...

or get SVN to generate a working copy without the .svn directories in it

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.

prodigitalson
A: 

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.

Chris S
Unfortunately I'm tied to an editor which only integrates with svn. Mercurial sounds cool, though!
4AM
A: 

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)

micmcg
I may end up switching answers and going with this, since committing every change as I test the code from the working copy really defeats the whole point of version control in the first place. I'm unfortunately bound to SVN as well...
4AM
Well, 12 long hours later, and I have a launchd daemon launching a shell script, triggered by WatchPaths and using rsync with --exclude "*.svn" to a separate ./build directory in the project folder, which FF now loads from. I'm going to have to clean this baby up and post it on MacOSXHints. (Spent a good chunk of that time wondering why launchd wouldn't pick up my changes...it's "WatchPaths" not "WatchPath"! UGH always the little things, isn't it?) Thanks for the answer!
4AM
Glad you got it working. Would be interested to see the source code if you could post it up.
micmcg
A: 

Use the svn export command to make a (non-recommitable) checkout of your working copy that doesn't include .svn directories.

BipedalShark
I've decided to go with exporting at the end of each build and pointing my link to the exported directory. Using --force allows me to overwrite it each time. It seems so foolishly simple now, thanks a bunch!
4AM
No offense, but micmcg got me thinking, and I took a day to learn how launchd works and it pretty well opened up a huge range of possibilities outside the scope of this question as well :-) Thanks for getting me up and running again, though!
4AM