Tuesday, December 2, 2008

Eclipse + SourceForge + SVN

So this is what kicked it off... 

I have a project on SourceForge (http://sourceforge.net/projects/metasimian) and have collected some stray source code that I wanted to upload.   I'm an Eclipse-type guy so I figured I would try to do it like a "real" developer (although a "real" developer would have done it from EMACS...).  

SourceForge has two types of version repositories: CVS and SVN (Subversion).   I started with Eclipse + SourceForge + CVS over PuTTY/SSH (more here and here), but ran into trouble.  Eclipse was unintentionally uploading .class files that I didn't want uploaded.  You can't actually delete in CVS, only "remove" files from the latest version.  This annoyed me considering that this was supposed to be a brand-new "clean" repository.  So I sent SourceForge an e-mail asking to have the repository deleted (which they generously did).  In the meantime, I never got around to a second try.  

At some point in time I figured I would "upgrade" and see what SVN had to offer.    To get SVN to work with Eclipse, besides Eclipse itself and the other bits (JDK), you need to install Subclipse, and Subversion.  I clicked through the installation, then followed the installation directions for setting up my SVN SourceForge repository in Eclipse.  

The repository root URL that I used was: https://metasimian.svn.sourceforge.net/svnroot/metasimian (notice 'https', presumably with  no '/' at the end either...). Didn't work (kept on being redirected to 'http').  I tried changing the URL a couple of times.  Nope.  I then tried configuring it to use 'svn+ssh' using PuTTY again using my user's SourceForge key (à la CVS).  Nah ('exec of 'ssh' failed: No such file or directory').   Tried to fix the SSH parameter in the config file (mine are in C:\Documents and Settings\[username]\Application Data\Subversion\), but still no dice.  Firewall? Doesn't look like it. Does SourceForge even support the damn thing? I give up.  Maybe not yet.  

One last check.  Subclipse uses the default SVN configuration files.  I took another look and noticed in 'servers' that there was a commented-out line under [global]: #http-auth-types = basic;digest;negotiate .  After removing the '#', I reattempted to connect and... success!  I uploaded, well, very little for now (trying to avoid the same mistake that I had on CVS), but more should be coming soon.  At any rate, one less obstacle towards open source nirvana.

1 comments:

metasimian said...

Small post-mortem: I tried to "undo" my fix to collect a couple of screenshots/error messages, but Eclipse + SourceForge/SVN kept on working. I dunno. Either something is cached or my "cure" had nothing to do with it (which would mean that why it works is a mystery...). I don't know what to tell you other than YMMV...