Friday, 26 August 2011

Just discovered SVN switch command - switch to a different branch instead of doing a full checkout

I've been doing complete checkouts whenever our branches get renamed,
instead of using "svn switch". Not a small pain considering it takes 8
minutes to do a full checkout. Good thing this doesn't happen that
often (and probably the reason I haven't discovered the command. not
painful enough). How embarrassing!

Quick example of using SVN's "switch" command

$ cd calc

$ svn info | grep URL

$ svn switch
U integer.c
U button.c
U Makefile
Updated to revision 341.

$ svn info | grep URL

Only fewer files need to be updated. More time to read Hacker News. =)


No comments: