Tech Blog :: shell


Nov 10 '09 4:33pm
Tags

Shell shortcut for SVN URL

This took me some time to figure out. It's a shell command to extract the URL from an svn info command. Run this (or put it in .bash_profile):

alias svnurl="svn info | egrep '^URL: (.*)' | sed s/URL\:\ //"

Then you can do things like svn ls $(svnurl) or svn log $(svnurl) to run commands on the remote repository. I expect this'll save me a bunch of time in the future.

And this is another one I've used for a while, to view changes in a working copy, especially useful when there are externals that output text even when there are no changes:

alias svnnew='svn st | grep -e "^[!M?~ACDR ]"'