Re: Regarding shallow checkouts
From: Ryan Schmidt <subversion-2010a_at_ryandesign.com>
Date: Mon, 22 Feb 2010 23:53:50 -0600
On Feb 22, 2010, at 22:48, An Me wrote:
> On Mon, Feb 22, 2010 at 9:54 PM, Andrey Repin wrote:
Maybe it is not useful for you. It might not be applicable to all workflows. It can be very useful for example if you have a web site in Subversion and need to only fix a typo on a single page. Or if you are an artist working on a game and only need to check out the graphics you are currently editing, and don't need all the other graphics or sounds or game code.
Personally, I use shallow checkouts for some types of changes in MacPorts. MacPorts is a package management system for Mac OS X written in Tcl. Each port is represented by a Tcl file that defines certain variables like the port name, version, category, and so on. Each port file lives in a directory with the name of the port, which lives in a directory with the name of the category. For example our php5 port lives in trunk/dports/lang/php5/Portfile. You can browse the tree here:
Now suppose I want to change a port's category, as I did for php5 in r49690 when I moved it to the lang category from the www category because it is in fact a language and not limited to web programming:
How could I do this? I could do it with URLs:
svn mv \
But the category is also listed in the port file itself. If I just move the port's directory to the new category's directory without also editing the port file, the port file will still say the port is in the www category while the port directory is in the lang category directory. That won't do. I need to edit the port file at the same time as I move its directory. I could check out the entire dports directory, but if I don't plan to use that directory for other purposes later, it would be wasteful to check out all 6000+ ports just for this small rearrangement. It's more efficient to check out sparsely. I might use:
svn co -N http://svn.macosforge.org/repository/macports/trunk/dports
Yes, the syntax I show above is the old pre-Subversion 1.5 non-recursive checkout syntax instead of the new Subversion 1.5+ sparse checkout syntax, but only because I have not yet bothered to learn the latter.
This is an archived mail posted to the Subversion Users mailing list.