Important notice - 06 April 2013

All eosgarden activities have been closed forever, in order to focus on new projects.
The content of this website will stay as is, for archive purpose, but won't be updated anymore.
eosgarden software are still available for download, but are no longer maintained. Support is no longer available.
 
 

GitHub

All our OpenSource projects have been migrated to GitHub.
Feel free to fork!

About

SVN-Utils is a small but useful shell script to simplify some operations on SVN working-copies.
You will find below a list of it's features.
SVN-Utils is realeased under the BSD License. Feel free to use it, and modify it at your convenience.
 
 

Documentation

Table of contents

  1. Features
    1. Automatic SVN keywords
    2. SVN removal
    3. Mac OS X cleanup
    4. Automatic SVN add
  2. Usage

1. Features

1.1. Automatic SVN keywords

SVN-Util can be used to automatically set the «svn:keywords» property on all regular files of a working-copy.
The «svn:keywords» property is used to automatically replace some keywords in your files.
For instance, the «$Id$» keyword that is automatically expanded with the commit's date and author, revision number, etc.
With Subversion, you need to set the list of available keywords on all files. SVN-Util can do this automatically for all the files in a working-copy.
To do this, simply invoke the script with the «-k» or «--keywords» command:
svn-util -k ~/myProject

1.2. SVN removal

Subversion stores informations about a working-copy in hidden directories named «.svn». Such a directory is present in every directory of a working-copy.
SVN-Util can automatically delete all that «.svn» directories in a working-copy, making it a standard, unversioned directory.
This can be useful for instance if you want to copy a working-copy over FTP, or create an archive.
To do this, simply invoke the script with the «-d» or «--delete» command:
svn-util -d ~/myProject

1.3. Mac OS X cleanup

Mac OS X stores the Finder view's settings per directory in hidden files named «.DS_Store».
When manipulating files from the Finder, those files are automatically created in the direcotories you are working in.
It can be very embarassing when using a SVN working-copy, as you will see all that «.DS_Store» files reported as unversioned files.
SVN-Util can clean all the «.DS_Store» files in a working-copy.
To do this, simply invoke the script with the «-c» or «--clean» command:
svn-util -c ~/myProject

1.4. Automatic SVN add

SVN-Util can be used to automatically mark all unversioned files present in working-copy, so they will be added to the repository with the next commit.
To do this, simply invoke the script with the «-a» or «--add» command:
svn-util -a ~/myProject

2. Usage

The script has to be invoked from the command line.
It takes two arguments: a command name and the path to a SVN working-copy.
Please refer to the features list to learn more about the available commands.
For instance:
bash svn-util.sh -k ~/myProject
Note that you can also make the SVN-Util script available like standard Unix commands.
Simply copy it in a directory that's included in your executable path (like /usr/local/bin/), and make sure the executable flag is set.
For instance:
sudo cp svn-util.sh /usr/local/bin/svn-util
sudo chmod 755 /usr/local/bin/svn-util
You'll then be able to call the script as a normal executable:
svn-util -k ~/myProject