svn cd.
Since, each checkout or update is done non recursively, the entire repository is not checked out.
1 2 function scd() { 3 # Get SVN repo url and remove the parts we don't need. 4 if svn ls `svn info |grep "URL: http://"|cut -c6-`/$1 5 then 6 # Break apart each entry in the path 7 for partial in $(echo $1 | tr '/' ' ') 8 do 9 # non recursively update that part and cd 10 # into the direcotry. 11 svn update -N $partial 12 # Should check to see if the last entry is a 13 # file or directory before cd'ing into it. 14 # Could do it like so: 15 # if file $partial | grep -e ': directory$' 16 # then 17 # cd $partial 18 # fi 19 # But I have not tried it out. 20 cd $partial 21 done 22 fi 23 }
The way one would use it is. First checkout you repo as normal except use a -N flag as well.
For example:
svn co -N http://www.example.com/repo/ /home/example/repo
Now say yoy wanted to go to your trunk, you would do:
cd /home/example/repo
scd some/long/path/to/a/set/of/modules/module1/trunk
You would now be in some/long/path/to/a/set/of/modules/module1/trunk everything but trunk checked out.