1.6 change: '--set-depth exclude' support
The official documentation of the Subversion version control system
Brought to you by:
cmpilato,
danielshahaf
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: cmpilato
(No comment was entered for this change.)
Summary: 1.6 change: '--set-depth exclude' support
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: cmpilato
Note that it isn't just path exclusion that's now supported -- it's arbitrary depth
reduction up to and including exclusion. Cool!
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: pipping....@gmail.com
From my understanding, it is not possible to do something like
$ svn checkout --depth empty [..] <dir>
$ cd <dir>
$ svn up --set-depth exclude <nasty_dir>
rather, one first has to check something out before it can be excluded which means it
has to be downloaded at least once. It also looks like one can't set the depth
without using `svn up` -- otherwise I suppose one could set the depth to infinite
first and set it to exclude for <nasty_dir> afterwards when actually downloading
something.
You might want to make the above aspects very clear, assuming they reflect the truth,
since I perceived finding the above out as very frustrating.
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: cmpilato
That's a great point you make, pipping.elias. I never realized it before (and I use
sparse checkouts all the time), but the continuing lack of a way to say "I want
everything except <this>" is a bit of an operational shortcoming in Subversion.
I wonder if there is a workaround:
svn checkout --depth immediates <dir> # get just <dir> and its shallow kids
svn up --set-depth exclude <nasty_dir> # exclude <nasty_dir>
svn up --set-depth infinity * # de-shallow the rest of the kids
?
(Haven't tried it. Maybe you will?)
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: pipping....@gmail.com
Your workaround works, except that it has to be applied multiple times:
Assume the repository <repo> contains a file <f> as well as <d1/f> and <d2/f> and the
corresponding subdirectories.
$ svn checkout --depth immediates <repo>
will fetch <f> as well as create the empty directores <d1> and <d2> now
$ svn up --set-depth exclude <d1>
will remove <d1> leaving us with <f> and the empty <d2>.
$ svn up --set-depth infinity *
will (aside from ignoring files or directories that begin with a dot) be equivalent
to
$ svn up --set-depth infinity <f> <d2>
where only the effect for <d2> matters, pulling in <d2/f>. Now the problem is that if
a file <d3/f> is added,
$ svn up
will only fetch the empty directory <d3>. Thus,
$ svn up --st-depth infinity *
would have to be called every time a new directory is added.
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: nathan.j...@gmail.com
I tried using the suggestion by cmpilato:
svn checkout --depth immediates <dir> # get just <dir> and its shallow kids
svn up --set-depth exclude <nasty_dir> # exclude <nasty_dir>
svn up --set-depth infinity * # de-shallow the rest of the kids
It works except for one issue. I have an external definition, and after I execute
these commands, there doesn't seem to be any way to get my external. When I do the
checkout with --depth immediates it doesn't check out the external. Any ideas?
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: cmpilato
Externals definitions require "infinity" depth of their host directory. Sorry, I
have no workarounds for that one. :-(
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: cmpilato
Issue 99 has been merged into this issue.
Related
Tickets:
#99View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: cmpilato
See also:
http://subversion.apache.org/docs/release-notes/1.6.html#sparse-directory-exclusion
http://blogs.open.collab.net/svn/2009/03/sparse-directories-now-with-exclusion.html
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: pipping....@gmail.com
The second links gives me a 404.
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: cmpilato
Oops! Yep, sure enough. I forgot that CollabNet relocated its blogs (ahem, without leaving forward pointers...):
http://blogs.collab.net/subversion/2009/03/sparse-directories-now-with-exclusion/
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: cmpilato
[r3879]
Status: Fixed