Wednesday, October 29, 2008

helpful svn commands

Here are some useful subversion commands I'd like to remember. But instead, I'll write them down, cause I'm always forgetting.

The simplest being the ubiquitous "checkout the latest version of the source", using ffmpeg as the example:
svn checkout svn:// ffmpeg

Here's an example of a command to checkout a specific version of code, where "co" is shorthand for "checkout" and "-r" is the parameter to specify a particular revision number:
svn co -r 12000 svn:// ffmpeg

After you've downloaded that version, you can check the date stamps on the files by using the following command. The log option shows you dates/time/version numbers of the files in the svn repository. It sorts the code in the repository by date. I then pipe the output to awk to print only the date column and then remove blank lines with sed:
svn log ffmpeg | awk -F"|" '{print $3}' | sed '/^$/d'

that's all I have for now. I will update when I have time,

No comments:

Feel free to drop me a line or ask me a question.