User Tools

Site Tools


Shell Scripts and useful commands

Displaying The SVN repository tree

To display the SVN repository tree, you can use the following commands:

  • Through SSH:
    svn list svn+ssh:// -R | egrep "/$"
  • Through WebDav:
    svn list --username my_username -R | egrep "/$"

Searching a function location in the SVN repository


  • The following scripts have only been designed for a bash shell, compatibility with other shells is not guaranteed
  • Python must be installed to run the script. You can install it with the following commands:
sudo yum install python
sudo apt-get install python

or from the sources here

  • The execution of this script can be time consuming depending on the precision of the providaded search location (from under a minute to more than half an hour)

Download the following archive and extract it in the folder of you choice with the command:

tar -zxvf scripts.tar.gz

Go in the script folder created and give yourself permission to execute those scripts with the command:

chmod u+x

The only script you need to run is The script takes two parameters:

  • The first parameter is the name of the function you are looking for in the SVN tree
  • The second parameter is optionnal and is a sub-tree path in which you want the research to be conducted. Depending on the depth of the given sub-tree, this parameter can tremendously reduce the search time.


Let's say that we are interested in looking at the code of the function CDTFrontend(proj) that generate the GeCoS IR from a C source file and that we have a hint that it might be located under trunk/gecos/ sub-repository. We can then call the script as follow:

./ CDTFrontend "trunk/gecos/"

which should return the following output after a few seconds:

Final location is : 

If you don't have any clue about the function location, you can look it up from a more distant location from trunk/ instead, which will give the same results but take more time (around 3-4 minutes for this example, up to 6-7 minutes for some other functions):

./ CDTFrontend "trunk/"

You can also search over all SVN branchs by calling the script without a third parameter, but be ready for a very long search time. What's more the script will stop at the first matching result, for efficiency purposes.

shellscripts.txt · Last modified: 2016/11/22 14:46 by tlefeuvr