The job market that will soon be…
April 27, 2008 Tech 1 CommentSo I found this video on YouTube and it is a perfect example of what the job market will be like if we are not fucking careful and mindful of our economy…
So I found this video on YouTube and it is a perfect example of what the job market will be like if we are not fucking careful and mindful of our economy…
I recently ported the toobs project from sourceforge (SVN) to github (git). So in order to do this I had to get git-svn to work. So with my last post I showed how I got the application to run, however, if you try and commit changes back to svn (git-svn dcommit) you will most likely end up with this error:
Password for 'mike': Can't locate Term/ReadKey.pm in @INC (@INC contains: /usr/local/lib/perl5/site_perl/5.8.6/darwin-thread-multi-2level /usr/local/lib/perl5/site_perl/5.8.6 /usr/local/lib/perl5/site_perl /System/Library/Perl/5.8.6/darwin-thread-multi-2level /System/Library/Perl/5.8.6 /Library/Perl/5.8.6/darwin-thread-multi-2level /Library/Perl/5.8.6 /Library/Perl /Network/Library/Perl/5.8.6/darwin-thread-multi-2level /Network/Library/Perl/5.8.6 /Network/Library/Perl /System/Library/Perl/Extras/5.8.6/darwin-thread-multi-2level /System/Library/Perl/Extras/5.8.6 /Library/Perl/5.8.1 .) at /usr/bin/git-svn line 2272.
This is because git-svn needs the ReadKey perl module to be able to read the server’s key to encrypt the password before it sends the password to the server. (wouldn’t want to be sending passwords in plain text across the internet would you?). Here is the solution:
Pull up the CPAN teminal:
perl -MCPAN -e shell
You may need to set it up if you have never used it…. just use defaults if you are not sure
Once at the cpan prompt install the needed module:
cpan> install Term::ReadKey
once it is finished go ahead and quit the cpan terminal and you should be able to run git-svn dcommit and everything should be peachy
For help on porting an SVN repository over to a local git repository go here:
www.simplisticcomplexity.com
After a few hours of googling and pull some hair out, I have finally figured out how to make git-svn work on Mac OSX 10.4 Tiger. If you have installed git on your Mac using mac-ports or source, you will find that running git-svn causes an error similar to this:
Can't locate SVN/Core.pm in @INC (@INC contains: /usr/local/lib/perl5/site_perl/5.8.6/darwin-thread-multi-2level /usr/local/lib/perl5/site_perl/5.8.6 /usr/local/lib/perl5/site_perl /sw/lib/perl5 /sw/lib/perl5/darwin /System/Library/Perl/5.8.6/darwin-thread-multi-2level /System/Library/Perl/5.8.6 /Library/Perl/5.8.6/darwin-thread-multi-2level /Library/Perl/5.8.6 /Library/Perl /Network/Library/Perl/5.8.6/darwin-thread-multi-2level /Network/Library/Perl/5.8.6 /Network/Library/Perl /System/Library/Perl/Extras/5.8.6/darwin-thread-multi-2level /System/Library/Perl/Extras/5.8.6 /Library/Perl/5.8.1 .) at /usr/bin/git-svn line 24.
This is because when you installed SVN it didn’t put the perl modules in the correct place. Here is a quick way to fix it.
mike@mikes-laptop$ locate SVN/Core.pm
In my case it was located in /usr/local/lib/svn-perl/SVN/Core.pm
Now we need to link that SVN directory in to your perl directory so perl can pick it up and use it. We will put it in /System/Library/Perl/Extras/5.8.6
mike@mikes-laptop$ sudo ln -s /usr/local/lib/svn-perl/SVN /System/Library/Perl/Extras/5.8.6/SVN
Now if you run git-svn you will notice a different error that resembles this:
Can't locate loadable object for module SVN::_Core in @INC (@INC contains: /usr/local/lib/perl5/site_perl/5.8.6/darwin-thread-multi-2level /usr/local/lib/perl5/site_perl/5.8.6 /usr/local/lib/perl5/site_perl /sw/lib/perl5 /sw/lib/perl5/darwin /System/Library/Perl/5.8.6/darwin-thread-multi-2level /System/Library/Perl/5.8.6 /Library/Perl/5.8.6/darwin-thread-multi-2level /Library/Perl/5.8.6 /Library/Perl /Network/Library/Perl/5.8.6/darwin-thread-multi-2level /Network/Library/Perl/5.8.6 /Network/Library/Perl /System/Library/Perl/Extras/5.8.6/darwin-thread-multi-2level /System/Library/Perl/Extras/5.8.6 /Library/Perl/5.8.1 .) at /System/Library/Perl/Extras/5.8.6/SVN/Base.pm line 59
BEGIN failed--compilation aborted at /System/Library/Perl/Extras/5.8.6/SVN/Core.pm line 5.
Compilation failed in require at /usr/bin/git-svn line 24.
We just need to link the auto/svn directory as well. Use the prior base path but instead of SVN you use auto/svn. Like so:
mike@mikes-laptop$ sudo ln -s /usr/local/lib/svn-perl/auto/svn /System/Library/Perl/Extras/5.8.6/auto/svn
And there you have it. If you try running git-svn you should be presented with an available command list.
So, today, I get presented with the task of setting up a git repository for my office to experiment and test as a replacement for SVN. Imagine my surprise, considering that I came in to this office preaching the benefits of distributed source control and the awesomeness of git, just to get blown off by everyone due to lack of understanding. Now, everyone thinks its a good idea all of a sudden and I think that github.com really drove that one home for me. Thank you Chris and github. Anyway, so now, I get to try and create a repository using git and get Cruise Control to build from it.. never a dull day in Mike’s world at work…