You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Dimitri Yanculovici <di...@orange-ftgroup.com> on 2009/02/05 08:31:00 UTC

svn:externals ../ in local path

Hi,

 

I would like to know if the "../" in the local path of an svn:externals
definition is planed to be supported.

 

It isn't in the 1.5 version of svn : "Also, the local subdirectory part of
the definition cannot contain .. parent directory indicators (such as
../../skins/myskin)."

 

Is there a bug (enhancement) already opened for that in the subversion issue
tracker?

I didn't find one.

 

 

Thanks.

 

Dimitri.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1106406

Re: svn:externals ../ in local path

Posted by Michae Sinz <Mi...@sinz.org>.
On Thu, Feb 5, 2009 at 3:31 AM, Dimitri Yanculovici <
dimitri.yanculovici@orange-ftgroup.com> wrote:

>  Hi,
>
>
>
> I would like to know if the "../" in the local path of an svn:externals
> definition is planed to be supported.
>
>
>
> It isn't in the 1.5 version of svn : "Also, the local subdirectory part of
> the definition cannot contain .. parent directory indicators (such as
> ../../skins/myskin)."
>

To do what you ask would introduce a security risk and attack vector to any
client checking out code from a given repository.

-- 
Michael Sinz               Technology and Engineering Director/Consultant
"Starting Startups"                          mailto:Michael.Sinz@sinz.org
My place on the web                      http://www.sinz.org/Michael.Sinz

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1131612

RE: svn:externals ../ in local path

Posted by Dimitri Yanculovici <di...@orange-ftgroup.com>.
Hi Blair,

Thank you for your suggestions.
I think I will opt for the first one (a directory dedicated to checkouts,
with no content but only externals definitions...)


Just to let you know my special case:

I work on the Eclipse IDE. I use it to create platform projects and
component projects. Platforms are built by assembly of components; so
platform projects refer to component projects.

I want to put those Eclipse projects in an SCM. The constraints are the
followings:
  - Do not duplicate code on the repository: if two platforms instantiate
the same component, this component must not appear in two different
locations in the repository (=> impose the tree structure of the
repository).
  - Automate the multiple checkouts using as less actions as possible: the
goal of the IDE is to break the back of the work for the user (=>
svn:externals)
  - On a checkout of a platform, the referenced components must be checkout
as well and placed at the same level in the local folder (workspace for
Eclipse users) than the platform's one (=> ../ in the local path of the
svn:externals associated to the platform project).


I think that it can be a recurrent issue for people using svn inside an IDE.
As you say there is several ways to by-pass the issue; but I don't think
that they are as intuitive as the management of "../".


Regards,
Dimitri.

-----Message d'origine-----
De : Blair Zajac [mailto:blair@orcaware.com] 
Envoyé : samedi 7 février 2009 00:34
À : Dimitri Yanculovici
Cc : dev@subversion.tigris.org
Objet : Re: svn:externals ../ in local path

Dimitri Yanculovici wrote:
> Hi Blair,
> 
> Thanks for your answer.
> 
> Here is what I want to do:
> 
> My repository tree structure is:
> 
> <repository>
> 	|- components/
> 	|	|- component1/
> 	|	|- component2/
> 	|	`- component3/
> 	`- platforms/
> 		`- platform1/	<- svn:externals
> 
> "platform1" refers to "component1",2,3 thus what I need after a checkout
of
> "platform1" is:
> 
> <local_current_dir>
> 	|- component1/
> 	|- component2/
> 	|- component3/
> 	`- platform1/
> 
> 
> So the only way (that I've found) to automate this (excluding the
individual
> checkout of the 3 components and the platform) would be to add
svn:externals
> properties on the "platform1/" directory as follow:
> 
> ../component1/ http://repository_url/components/component1/
> ../component2/ http://repository_url/components/component2/
> ../component3/ http://repository_url/components/component3/
> 
> 
> But ../component1/ is not supported...
> 
> 
> If I put the svn:externals on the parent directory (here it's
"platforms/").
> I can obtain the following tree structure after a checkout of
"platforms/":
> 
> <local_current_dir>
> 	`- platforms/
> 		|- component1/
> 		|- component2/
> 		|- component3/
> 		`- platform1/
> 
> But it's not what I want to do. I really need to force the checkout of the
> three components during the checkout of platform1 and not platforms.
> 
> You may think that it's the design of my repository's tree structure which
> is not adapted, but I have other constraints which force me to build it
like
> that...

It would be good to hear those constraints to justify work on this feature. 
Howver, I don't see this feature being implemented anytime soon in svn.
There 
are some solutions.  You could have another directory called 'checkouts'
that 
has externals to platform1, component{1,2,3} and then a single checkout
grabs 
everything the way you want.  Or you could have the externals on your
platforms 
and use sparse checkouts to get only the platform you need.

Regards,
Blair

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1128481


Re: svn:externals ../ in local path

Posted by Blair Zajac <bl...@orcaware.com>.
Dimitri Yanculovici wrote:
> Hi Blair,
> 
> Thanks for your answer.
> 
> Here is what I want to do:
> 
> My repository tree structure is:
> 
> <repository>
> 	|- components/
> 	|	|- component1/
> 	|	|- component2/
> 	|	`- component3/
> 	`- platforms/
> 		`- platform1/	<- svn:externals
> 
> "platform1" refers to "component1",2,3 thus what I need after a checkout of
> "platform1" is:
> 
> <local_current_dir>
> 	|- component1/
> 	|- component2/
> 	|- component3/
> 	`- platform1/
> 
> 
> So the only way (that I've found) to automate this (excluding the individual
> checkout of the 3 components and the platform) would be to add svn:externals
> properties on the "platform1/" directory as follow:
> 
> ../component1/ http://repository_url/components/component1/
> ../component2/ http://repository_url/components/component2/
> ../component3/ http://repository_url/components/component3/
> 
> 
> But ../component1/ is not supported...
> 
> 
> If I put the svn:externals on the parent directory (here it's "platforms/").
> I can obtain the following tree structure after a checkout of "platforms/":
> 
> <local_current_dir>
> 	`- platforms/
> 		|- component1/
> 		|- component2/
> 		|- component3/
> 		`- platform1/
> 
> But it's not what I want to do. I really need to force the checkout of the
> three components during the checkout of platform1 and not platforms.
> 
> You may think that it's the design of my repository's tree structure which
> is not adapted, but I have other constraints which force me to build it like
> that...

It would be good to hear those constraints to justify work on this feature. 
Howver, I don't see this feature being implemented anytime soon in svn.  There 
are some solutions.  You could have another directory called 'checkouts' that 
has externals to platform1, component{1,2,3} and then a single checkout grabs 
everything the way you want.  Or you could have the externals on your platforms 
and use sparse checkouts to get only the platform you need.

Regards,
Blair

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1115291

RE: svn:externals ../ in local path

Posted by Dimitri Yanculovici <di...@orange-ftgroup.com>.
Hi Blair,

Thanks for your answer.

Here is what I want to do:

My repository tree structure is:

<repository>
	|- components/
	|	|- component1/
	|	|- component2/
	|	`- component3/
	`- platforms/
		`- platform1/	<- svn:externals

"platform1" refers to "component1",2,3 thus what I need after a checkout of
"platform1" is:

<local_current_dir>
	|- component1/
	|- component2/
	|- component3/
	`- platform1/


So the only way (that I've found) to automate this (excluding the individual
checkout of the 3 components and the platform) would be to add svn:externals
properties on the "platform1/" directory as follow:

../component1/ http://repository_url/components/component1/
../component2/ http://repository_url/components/component2/
../component3/ http://repository_url/components/component3/


But ../component1/ is not supported...


If I put the svn:externals on the parent directory (here it's "platforms/").
I can obtain the following tree structure after a checkout of "platforms/":

<local_current_dir>
	`- platforms/
		|- component1/
		|- component2/
		|- component3/
		`- platform1/

But it's not what I want to do. I really need to force the checkout of the
three components during the checkout of platform1 and not platforms.

You may think that it's the design of my repository's tree structure which
is not adapted, but I have other constraints which force me to build it like
that...



Dimitri.


-----Message d'origine-----
De : Blair Zajac [mailto:blair@orcaware.com] 
Envoyé : jeudi 5 février 2009 20:43
À : Dimitri Yanculovici
Cc : dev@subversion.tigris.org
Objet : Re: svn:externals ../ in local path

Dimitri Yanculovici wrote:
> Hi,
> 
> I would like to know if the “../” in the local path of an svn:externals 
> definition is planed to be supported.
> 
> It isn’t in the 1.5 version of svn : “Also, the local subdirectory part 
> of the definition cannot contain .. parent directory indicators (such as 
> ../../skins/myskin).”
> 
> Is there a bug (enhancement) already opened for that in the subversion 
> issue tracker?
> 
> I didn't find one.

No, it was a deliberate design decision not to support that.  If you want an

external to be dropped into a directory above the directory with the 
svn:external property, you need to move the property up to a level that has
the 
external checkout location to be a subdirectory.

What are you trying to do?

Blair

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1111400


Re: svn:externals ../ in local path

Posted by Blair Zajac <bl...@orcaware.com>.
Dimitri Yanculovici wrote:
> Hi,
> 
> I would like to know if the “../” in the local path of an svn:externals 
> definition is planed to be supported.
> 
> It isn’t in the 1.5 version of svn : “Also, the local subdirectory part 
> of the definition cannot contain .. parent directory indicators (such as 
> ../../skins/myskin).”
> 
> Is there a bug (enhancement) already opened for that in the subversion 
> issue tracker?
> 
> I didn't find one.

No, it was a deliberate design decision not to support that.  If you want an 
external to be dropped into a directory above the directory with the 
svn:external property, you need to move the property up to a level that has the 
external checkout location to be a subdirectory.

What are you trying to do?

Blair

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1108815