Menu

#27 1.6 change: '--set-depth exclude' support

en-1.6
Fixed
nobody
None
Medium
Enhancement
2011-07-05
2009-01-14
Anonymous
No

Originally created by: cmpilato
Originally owned by: cmpilato

Subversion 1.6 supports the 'exclude' value for the --set-depth option.
We'll wanna document this in chapters 3 and 9.

Related

Tickets: #99

Discussion

  • Anonymous

    Anonymous - 2009-01-14

    Originally posted by: cmpilato

    (No comment was entered for this change.)

    Summary: 1.6 change: '--set-depth exclude' support

     
  • Anonymous

    Anonymous - 2009-03-05

    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!

     
  • Anonymous

    Anonymous - 2009-11-17

    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.

     
  • Anonymous

    Anonymous - 2009-11-17

    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?)

     
  • Anonymous

    Anonymous - 2009-11-18

    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.

     
  • Anonymous

    Anonymous - 2009-12-22

    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?

     
  • Anonymous

    Anonymous - 2009-12-22

    Originally posted by: cmpilato

    Externals definitions require "infinity" depth of their host directory.  Sorry, I
    have no workarounds for that one. :-(

     
  • Anonymous

    Anonymous - 2011-06-30

    Originally posted by: pipping....@gmail.com

    The second links gives me a 404.

     
  • Anonymous

    Anonymous - 2011-06-30

    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/

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.