Showing posts with label subversion. Show all posts
Showing posts with label subversion. Show all posts

Thursday, 24 January 2013

Upgrading to Subversion 1.7 in Ubuntu

Just a quick post this time. I recently had to upgrade the Subversion (SVN) software on my Ubuntu system to version 1.7. This version is (currently) not included in the regular Ubuntu distribution, but I found the solution in an Ubuntu forum thread - simply run this in a terminal:


echo "deb http://opensource.wandisco.com/ubuntu lucid svn17" | sudo tee /etc/apt/sources.list.d/svn.list
sudo wget -q http://opensource.wandisco.com/wandisco-debian.gpg -O- | sudo apt-key add -
sudo apt-get update
sudo apt-get dist-upgrade

Thursday, 29 September 2011

Matlab and version control with Subversion

At my company, we use Subversion for version control of our software. I currently use RabbitVCS as a file explorer front-end for Subversion (in Ubuntu Linux), but I've been looking for a way to use Subversion directly from Matlab.

I haven't found any solution that fully integrates with the file explorer in Matlab yet, although there are some useful tools available. However, it wasn't until today that I realized (the bleeding obvious fact) that the Subversion command line interface can be used directly from the command line. Simply put an exclamation mark in front and call the svn commands as usual, for example:

!svn help
!svn status
!svn add file1.m
!svn commit -m "This is a log message"

The command line version of Subversion is both simple and reliable, so until the Mathworks makes an official Subversion plugin, I guess I'm sticking to this approach.

Tuesday, 10 August 2010

Merging several changes into an incomplete svn tree

I have been using Subversion (SVN) for version control of my files for some time now, but recently I was away for half a year without being able to commit changes to the SVN server. In addition, I only save some of the files in my folders, to avoid versioning large binary files. These are some of the things I learned trying to merge all my changes into the incomplete SVN tree:
  • To avoid adding certain files, edit the global-ignores parameter in the svn config file (found under ~/.subversion/ on my Ubuntu installation) to ignore files matching certain patterns, for example *.pdf
  • To update an incomplete folder structure by copying in files from a complete folder structure, use the '-u' switch with the copy command, together with the '-r' switch for recursive copying: cp -u -r compTree inCompTree
  • To check if files or folders in the current folder are versioned (registered in the svn system), use svn status --depth=immediates
  • If you want to restructure the folder tree, it's easier to do this directly in the repository rather than changing the structure of the working copy and then commiting (I used the RabbitVCS repository browser, but it's possible to do via the command line)
  • Finally, it's often better to check out a subfolder of the repository rather than the complete tree - it saves both time and disk space. Example: svn checkout svn://server/Topfolder/Subfolder Subfolder will only check out the "Subfolder" folder and create a local copy.