> On Jun 7, 2019, at 7:17 PM, Mun Johl <mun.johl_at_kazan-networks.com> wrote:
>
> Hi Mark,
>
> Thank you for your reply.
> Please see my comments below.
>
>
> On Fri, Jun 07, 2019 at 03:37 PM PDT, Mark Phippard wrote:
>>> On Jun 7, 2019, at 4:34 PM, Mun Johl <mun.johl_at_kazan-networks.com<mailto:mun.johl_at_kazan-networks.com>> wrote:
>>>
>>> We're using SVN version 1.8.19 on Red Hat Enterprise Linux 6.8 .
>>>
>>> For one of our projects, the SVN area is a sparse directory. I'm
>>> wondering what's the best way to update that directory?
>>>
>>> I've searched the web but haven't found a definitive answer to how to
>>> _update_ a sparse directory.
>>>
>>> Should I do an "svn update" at the root directory, and then traverse the
>>> lower levels and do updates as well?
>>>
>>> Based on a web answer, I thought "svn update *" at the root level would
>>> work; but it turns out that it doesn't actually update all directories
>>> (at least, not in my case).
>>
>> You just run svn up and it basically says as much in the docs:
>>
>> http://svnbook.red-bean.com/en/1.7/svn.advanced.sparsedirs.html
>>
>> "Fortunately, having a complex collection of ambient depths in a single working copy doesn't complicate the way you interact with that working copy. You can still make, revert, display, and commit local modifications in your working copy without providing any new options (including --depth and --set-depth) to the relevant subcommands. Even svn update works as it does elsewhere when no specific depth is provided--it updates the working copy targets that are present while honoring their sticky depths."
>
> I did see/read that, but "svn up" doesn't work for me.
>
>> If this is not working for you provide a script that shows what you are doing and what you are getting.
>
> If I do an "svn up" at the root dir, I get something like this:
>
> Updating '.':
> At revision 100000.
>
> But I know that there have been updates down a few directory levels.
> Hmm, I wonder if I'm not doing the "svn checkout" correctly. For
> example:
>
> If I'm in the dir "myDir" and I checkout sparsely as shown below:
>
> svn checkout svn://server.domain.com/abcd/branch_name/project1/one_dir project1/one_dir
>
> Note that "project1" has other directories other than "one_dir", but for
> the given project, only "one_dir" is required.
Take a closer look at the examples in the book. You cannot create a sparse directory using a series of checkouts. You have to selectively expand/contract parts of a single working copy. Using the SVN repos as an example:
svn co --depth immediates https://svn.apache.org/repos/asf/subversion/trunk svn-trunk
cd svn-trunk
svn up --set-depth infinity notes
svn up --set-depth infinity tools
svn up --set-depth immediates subversion
svn up --set-depth infinity subversion/bindings
These commands build the working copy with the folders I want. From this point on I can just do svn up at root of my WC and it will update all of the content I have selected for my working copy.
Mark
Received on 2019-06-08 01:36:31 CEST