You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by OBones <ob...@free.fr> on 2013/11/04 11:16:12 UTC

Setting sticky depth without grabbing content immediately

Hello,

When using the update command with subversion 1.8, one can set the 
sticky depth with the --set-depth option.
When changing from emtpy to infinity, all the files that were not 
retrieved yet are retrieved immediately.
While this is fine in most cases, I am in a situation where I'd like to 
prepare the working copy setting the depths but would like to have the 
files retrieved later on when doing an option-less update.
To sum up, based on svnbook sparse dirs example, here is what I'd like 
to be able to do:

$ svn checkout file:///var/svn/repos mom-empty --depth empty
Checked out revision 1.

$ svn update --set-depth infinity --record-only mom-empty/daughter
Updating 'mom-empty/daughter': depth recorded

$ svn update mom-empty
Updating 'mom-empty':
A    mom-empty/daughter
A    mom-empty/daughter/granddaughter1
A    mom-empty/daughter/granddaughter1/bunny1.txt
A    mom-empty/daughter/granddaughter1/bunny2.txt
A    mom-empty/daughter/granddaughter2
A    mom-empty/daughter/fishie.txt

Is this something that can be done? If yes, how can I achieve this?

Thanks for your help

Re: Setting sticky depth without grabbing content immediately

Posted by Johan Corveleyn <jc...@gmail.com>.
On Wed, Nov 6, 2013 at 12:33 PM, Bert Huijben <be...@qqmail.nl> wrote:
>
>
>> -----Original Message-----
>> From: OBones [mailto:obones@free.fr]
>> Sent: dinsdag 5 november 2013 14:06
>> To: Subversion Users
>> Subject: Re: Setting sticky depth without grabbing content immediately
>>
>> Johan Corveleyn wrote:
>> > I think this would be a useful feature. Whether or not someone will
>> > have time to work on it, or someone steps up to write a patch for it,
>> > is another matter. But I'd suggest that you enter this into the issue
>> > tracker in any case. Can you please file an issue for this?
>> Done: http://subversion.tigris.org/issues/show_bug.cgi?id=4445
>
> Currently the Subversion working only stores one depth value and this depth
> must match what is known about the children.
>
> If you would update this depth to infinity it would imply that all the
> children are known in the working copy and a further update would not bring
> them in. Fixing this requires keeping a second depth value just to allow
> this UI in one of many Subversion clients, with all kind of backwards
> compatibility concerns.

Perhaps a dumb question...

I don't know whether subversion first sets the depth value in the
metadata, and then processes the update, or vice versa. But if it's
the former, what happens when the update is interrupted after storing
the new depth value but before the children have been "received"? I
suppose this will mean the directory is marked as incomplete or
something like that, so that a subsequent update completes the update
and brings in everything?

Couldn't something similar be used for this use case? I.e. you create
/ prepare an "incomplete working copy" (or where some parts are
incomplete).

-- 
Johan

RE: Setting sticky depth without grabbing content immediately

Posted by Bert Huijben <be...@qqmail.nl>.

> -----Original Message-----
> From: OBones [mailto:obones@free.fr]
> Sent: dinsdag 5 november 2013 14:06
> To: Subversion Users
> Subject: Re: Setting sticky depth without grabbing content immediately
> 
> Johan Corveleyn wrote:
> > I think this would be a useful feature. Whether or not someone will
> > have time to work on it, or someone steps up to write a patch for it,
> > is another matter. But I'd suggest that you enter this into the issue
> > tracker in any case. Can you please file an issue for this?
> Done: http://subversion.tigris.org/issues/show_bug.cgi?id=4445

Currently the Subversion working only stores one depth value and this depth
must match what is known about the children. 

If you would update this depth to infinity it would imply that all the
children are known in the working copy and a further update would not bring
them in. Fixing this requires keeping a second depth value just to allow
this UI in one of many Subversion clients, with all kind of backwards
compatibility concerns.

What you could do is update/checkout the directory as r0 / the revision in
which it was created. In that revision it most likely doesn't have any
children. The further update would then go to the HEAD revision in which the
children are there.

If you are going to re-use that working copy as template (as I guess from
your question) I would recommend running 'svn cleanup' on it before storing,
to remove unneeded data in the .svn directory.

	Bert
> 
> Regards


Re: Setting sticky depth without grabbing content immediately

Posted by OBones <ob...@free.fr>.
Johan Corveleyn wrote:
> I think this would be a useful feature. Whether or not someone will 
> have time to work on it, or someone steps up to write a patch for it, 
> is another matter. But I'd suggest that you enter this into the issue 
> tracker in any case. Can you please file an issue for this? 
Done: http://subversion.tigris.org/issues/show_bug.cgi?id=4445

Regards

Re: Setting sticky depth without grabbing content immediately

Posted by Mouhanad Alkhaldi <el...@gmail.com>.
unsubscribe

Mouhand Alkhaldi


On Tue, Nov 5, 2013 at 1:44 PM, Johan Corveleyn <jc...@gmail.com> wrote:

> On Tue, Nov 5, 2013 at 9:20 AM, OBones <ob...@free.fr> wrote:
> > Stefan Sperling wrote:
> >>
> >> On Mon, Nov 04, 2013 at 11:16:12AM +0100, OBones wrote:
> >>>
> >>> Hello,
> >>>
> >>> When using the update command with subversion 1.8, one can set the
> sticky
> >>> depth with the --set-depth option.
> >>> When changing from emtpy to infinity, all the files that were not
> >>> retrieved
> >>> yet are retrieved immediately.
> >>> While this is fine in most cases, I am in a situation where I'd like to
> >>> prepare the working copy setting the depths but would like to have the
> >>> files
> >>> retrieved later on when doing an option-less update.
> >>> To sum up, based on svnbook sparse dirs example, here is what I'd like
> to
> >>> be
> >>> able to do:
> >>>
> >>> $ svn checkout file:///var/svn/repos mom-empty --depth empty
> >>> Checked out revision 1.
> >>>
> >>> $ svn update --set-depth infinity --record-only mom-empty/daughter
> >>> Updating 'mom-empty/daughter': depth recorded
> >>>
> >>> $ svn update mom-empty
> >>> Updating 'mom-empty':
> >>> A    mom-empty/daughter
> >>> A    mom-empty/daughter/granddaughter1
> >>> A    mom-empty/daughter/granddaughter1/bunny1.txt
> >>> A    mom-empty/daughter/granddaughter1/bunny2.txt
> >>> A    mom-empty/daughter/granddaughter2
> >>> A    mom-empty/daughter/fishie.txt
> >>>
> >>> Is this something that can be done? If yes, how can I achieve this?
> >>>
> >>> Thanks for your help
> >>
> >> Perhaps this can help you:
> >>
> >>
> https://svn.apache.org/repos/asf/subversion/trunk/tools/client-side/svn-viewspec.py
> >>
> > Thanks for this, but it won't help much in this case.
> > Basically, I'd like to prepare a working copy for a system that will do
> the
> > final svn update and over which I have no control. As a result, I'd like
> to
> > avoid, if possible, that this final update does nothing.
> > It seems it's not possible easily however, so I guess I'll have to live
> with
> > that useless update...
>
> I think this would be a useful feature. Whether or not someone will
> have time to work on it, or someone steps up to write a patch for it,
> is another matter. But I'd suggest that you enter this into the issue
> tracker in any case.
>
> Can you please file an issue for this?
>
> --
> Johan
>

Re: Setting sticky depth without grabbing content immediately

Posted by Johan Corveleyn <jc...@gmail.com>.
On Tue, Nov 5, 2013 at 9:20 AM, OBones <ob...@free.fr> wrote:
> Stefan Sperling wrote:
>>
>> On Mon, Nov 04, 2013 at 11:16:12AM +0100, OBones wrote:
>>>
>>> Hello,
>>>
>>> When using the update command with subversion 1.8, one can set the sticky
>>> depth with the --set-depth option.
>>> When changing from emtpy to infinity, all the files that were not
>>> retrieved
>>> yet are retrieved immediately.
>>> While this is fine in most cases, I am in a situation where I'd like to
>>> prepare the working copy setting the depths but would like to have the
>>> files
>>> retrieved later on when doing an option-less update.
>>> To sum up, based on svnbook sparse dirs example, here is what I'd like to
>>> be
>>> able to do:
>>>
>>> $ svn checkout file:///var/svn/repos mom-empty --depth empty
>>> Checked out revision 1.
>>>
>>> $ svn update --set-depth infinity --record-only mom-empty/daughter
>>> Updating 'mom-empty/daughter': depth recorded
>>>
>>> $ svn update mom-empty
>>> Updating 'mom-empty':
>>> A    mom-empty/daughter
>>> A    mom-empty/daughter/granddaughter1
>>> A    mom-empty/daughter/granddaughter1/bunny1.txt
>>> A    mom-empty/daughter/granddaughter1/bunny2.txt
>>> A    mom-empty/daughter/granddaughter2
>>> A    mom-empty/daughter/fishie.txt
>>>
>>> Is this something that can be done? If yes, how can I achieve this?
>>>
>>> Thanks for your help
>>
>> Perhaps this can help you:
>>
>> https://svn.apache.org/repos/asf/subversion/trunk/tools/client-side/svn-viewspec.py
>>
> Thanks for this, but it won't help much in this case.
> Basically, I'd like to prepare a working copy for a system that will do the
> final svn update and over which I have no control. As a result, I'd like to
> avoid, if possible, that this final update does nothing.
> It seems it's not possible easily however, so I guess I'll have to live with
> that useless update...

I think this would be a useful feature. Whether or not someone will
have time to work on it, or someone steps up to write a patch for it,
is another matter. But I'd suggest that you enter this into the issue
tracker in any case.

Can you please file an issue for this?

-- 
Johan

Re: Setting sticky depth without grabbing content immediately

Posted by OBones <ob...@free.fr>.
Stefan Sperling wrote:
> On Mon, Nov 04, 2013 at 11:16:12AM +0100, OBones wrote:
>> Hello,
>>
>> When using the update command with subversion 1.8, one can set the sticky
>> depth with the --set-depth option.
>> When changing from emtpy to infinity, all the files that were not retrieved
>> yet are retrieved immediately.
>> While this is fine in most cases, I am in a situation where I'd like to
>> prepare the working copy setting the depths but would like to have the files
>> retrieved later on when doing an option-less update.
>> To sum up, based on svnbook sparse dirs example, here is what I'd like to be
>> able to do:
>>
>> $ svn checkout file:///var/svn/repos mom-empty --depth empty
>> Checked out revision 1.
>>
>> $ svn update --set-depth infinity --record-only mom-empty/daughter
>> Updating 'mom-empty/daughter': depth recorded
>>
>> $ svn update mom-empty
>> Updating 'mom-empty':
>> A    mom-empty/daughter
>> A    mom-empty/daughter/granddaughter1
>> A    mom-empty/daughter/granddaughter1/bunny1.txt
>> A    mom-empty/daughter/granddaughter1/bunny2.txt
>> A    mom-empty/daughter/granddaughter2
>> A    mom-empty/daughter/fishie.txt
>>
>> Is this something that can be done? If yes, how can I achieve this?
>>
>> Thanks for your help
> Perhaps this can help you:
> https://svn.apache.org/repos/asf/subversion/trunk/tools/client-side/svn-viewspec.py
>
Thanks for this, but it won't help much in this case.
Basically, I'd like to prepare a working copy for a system that will do 
the final svn update and over which I have no control. As a result, I'd 
like to avoid, if possible, that this final update does nothing.
It seems it's not possible easily however, so I guess I'll have to live 
with that useless update...

Re: Setting sticky depth without grabbing content immediately

Posted by Stefan Sperling <st...@elego.de>.
On Mon, Nov 04, 2013 at 11:16:12AM +0100, OBones wrote:
> Hello,
> 
> When using the update command with subversion 1.8, one can set the sticky
> depth with the --set-depth option.
> When changing from emtpy to infinity, all the files that were not retrieved
> yet are retrieved immediately.
> While this is fine in most cases, I am in a situation where I'd like to
> prepare the working copy setting the depths but would like to have the files
> retrieved later on when doing an option-less update.
> To sum up, based on svnbook sparse dirs example, here is what I'd like to be
> able to do:
> 
> $ svn checkout file:///var/svn/repos mom-empty --depth empty
> Checked out revision 1.
> 
> $ svn update --set-depth infinity --record-only mom-empty/daughter
> Updating 'mom-empty/daughter': depth recorded
> 
> $ svn update mom-empty
> Updating 'mom-empty':
> A    mom-empty/daughter
> A    mom-empty/daughter/granddaughter1
> A    mom-empty/daughter/granddaughter1/bunny1.txt
> A    mom-empty/daughter/granddaughter1/bunny2.txt
> A    mom-empty/daughter/granddaughter2
> A    mom-empty/daughter/fishie.txt
> 
> Is this something that can be done? If yes, how can I achieve this?
> 
> Thanks for your help

Perhaps this can help you:
https://svn.apache.org/repos/asf/subversion/trunk/tools/client-side/svn-viewspec.py