About Me

My photo
Charleston, South Carolina, United States
Computer Science undergraduate student (Senior) at the College of Charleston.

Labels

Thursday, January 27, 2011

svn commit -m "added information about my experience with subversion"

I recently have been researching and playing around with subversion.  Learning to use this tool seems to be very important to getting involved in the open source world.  During previous team projects, my team mates and I have had serious issues dealing with version control.  I would actually say that version control has been the largest issue to my team projects.  I was aware of the existence of technologies such as subversion but we never looked into it due to time constraints.  I remember one specific occurrence when my team met up for a final discussion before our final presentation the next day.  We decided to touch up the code during the meeting and (of course) the changes that were made rendered our code utterly useless.  All of the tests we had written were now failing and we had no previous version of the code.  We stayed up late into the night attempting to repair what we had broken.  (As a side note we eventually got it up and running again with all tests passing)

So, my motivation to learn how to use subversion is quite strong.  I just wish it was introduced to me earlier.  I have downloaded a subversion client (tortoisesvn) and have begun to play around with it using Dr. Bowring's subversion server.  Initially I attempted to use the GUI but I found it to be limiting. (Uh oh, I'm starting to sound like a know it all, command line user!)  Using the GUI, I was able to add files to the repository but I quickly decided that I would prefer the command line.  Using the command line version, I quickly got a feel for the commands using the 'svn help' command.  I successfully checked out files from the repository and ran through a list of commands on the 'svn help' page (updating from the repository, committing changes, etc.).  The process has been pretty smooth and I'm excited to finally be getting this technology under my belt.

Ill point out two problems I had and the solutions I found to those problems in case anyone else in my class encounters this.

Problem One
From the windows command line, I originally tried to commit changes using the command 'svn commit' this gave me the following error

svn: Commit failed (details follow):
svn: Could not use external editor to fetch log message; consider setting the $SVN_EDITOR environment variable or using the --message (-m) or --file (-F) options svn: None of the environment variables
SVN_EDITOR, VISUAL or EDITOR is set, and no 'editor-cmd' run-time configuration option was found

Apparently a fix to this is to include a message with your commit using the -m
option. For example..

svn commit -m "added to the genetic algorithm"
 
Problem two
If you attempt an svn command such as 'svn commit' and you get an error that reads
"svn: C:\Users\Name\ is not a working copy" then you are not in the correct
directory. You need to 'cd' into the directory you have checked out.

No comments:

Post a Comment