On 30 Jul 2021, Daniel Shahaf wrote:
Ah, I didn't realize that --depth=files would prune directories already checked out. Either we'd have to change that default behavior, or add a new depth type... Or maybe the answer is just that '--depth=directories' automatically makes those directories sticky, so that other shallower depths
don't prune them.

So svn_depth_directories would be sticky and other depths wouldn't be? Off the cuff, can't say I like this. "Special cases aren't special
enough to break the rules."

Hmm, Do we remember what the justification is for 'svn update --depth=files' to prune directories already checked out? In other words, why is non-stickiness the default?

> The following might be a separate feature request but it > might be cool
> if 'svn update --set-depth=...' could support the '--parents'
> argument, at least when setting depth=files. Rationale: a > user might > want to bring in all the files in g (in a/b/c/d/e/f/g) and > all of g's > ancestors, but not g's siblings nor those of its > ancestors. (This use > case comes up often in a project I work on; don't know > whether anyone
> else has a need for this use case.)
> > Food for thought...

Yup. I'm inclined to start with the simple case (sparse tree of all directories and only directories), and discuss other fancier things as
separate features later.

That sounds like you'll do:

1. Identify a specific use-case
2. Design and implement it
3. Identify other related use-cases, design and implement them

I'd rather recommend:

A. Identify use-cases
B. Design something to address them
C. Implement support for at least one of the use-cases from (A) in a way
that builds towards implementing (B)

Agreed; that makes sense.

The use case I started with is:

"Check out a sparse tree, and then check out individual files -- some of them maybe large binary blobs, others maybe smaller -- where you need them. In many cases, one will simply go into a particular directory and run 'svn update --depth=files' to get all the files in that directory. Later, we could run 'svn update --depth=directories to make unmodified files go away. In practice, there might be wrapper scripts around all of this."

The above is the common use case in our shop, where we have customer data organized into directories. When we're working on a given customer, we want to "expand" all their data in place, and then when we're done we may or may not want to "contract" it.

What are some other use cases?

And does anyone know a good framework for identifying/describing use cases? This is not my area of specialty. Daniel's right, though -- we shouldn't just wing it, we should try to think it through carefully.

The top-line summary is: it would be great to support sparse directory trees. But I'm not sure the method I've proposed for doing so is the best choice available.

Best regards,
-Karl

Reply via email to