You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by David Bartmess <di...@edingo.net> on 2010/04/29 20:09:08 UTC
Can we use relative paths in svn:externals propset?
I have two projects under a single repository, with A being dependent on
B being checked out.
To set the svn:externals propset, can I use a relative path for the
checkout directory for the depending (B) directory?
Such as :
svn propset svn:externals "../buildsupport
http://<URL>/buildsupport/trunk" BuildScripts
Will this work? I can't afford to try it on that repository since it's a
live development repository...
Thanks!
--
"Dingo" Dave Bartmess
Broomfield, CO. USA
http://edingo.net
Re: Can we use relative paths in svn:externals propset?
Posted by Itamar O <it...@gmail.com>.
On Fri, Apr 30, 2010 at 5:00 AM, David Weintraub <qa...@gmail.com> wrote:
> On Thu, Apr 29, 2010 at 5:14 PM, David Bartmess <di...@edingo.net> wrote:
>> Thanks, that explains what I needed to know... Relative paths using a parent
>> (..) or absolute paths aren't handled. So it won't work with my system,
>> since all the build files point to a parent "sandbox" directory, not the
>> current directory, for the dependencies...
>
> You can use relative paths, but they are relative to the repository.
> For example if I had a directory at svn://repos/foo/bar/barfoo and it
> had svn:externals = ../foobar, it would be referring to
> svn://repos/foo/bar/foobar.
>
> Maybe you should read up on the book a bit. It sounds like you're
> confused about what svn:externals do.
>
> They check out a repository directory that is located elsewhere in the
> repository into your current working directory. Let's take the above
> project. It would checkout in your working directory the directory
> svn://repos/foo/bar/foobar under directory barfoo in your working
> directory.
>
> What it sounds like you have is a build issue. That is, you have your
> build referring to code that is not in your current working directory,
> but happens to be located in a parent directory. That has nothing to
> do with the svn:external property.
>
> --
> David Weintraub
> qazwart@gmail.com
>
There's still something you can do with svn:externals that might do the trick.
If your repository structure is currently:
/ (repository-root)
- proj-a
- trunk
- proj-b
- trunk
and your build system expects this:
/ (local-root-for-build)
- trunk-of-proj-a
- trunk-of-proj-b
you can add a repository directory "build-me" under proj-a:
/ (repository-root)
- proj-a
- trunk
- build-me
- proj-b
- trunk
set the svn:externals on "build-me" to:
../trunk trunk-of-proj-a
^/proj-b/trunk trunk-of-proj-b
this way, when you checkout build-me into your local-root-for-build,
you will get the desired layout.
(this will also work if you have proj-a and proj-b in different repositories,
if you use different svn:externals syntax (e.g. fully-qualified or
server-relative))
Itamar.
Re: Can we use relative paths in svn:externals propset?
Posted by David Weintraub <qa...@gmail.com>.
On Thu, Apr 29, 2010 at 5:14 PM, David Bartmess <di...@edingo.net> wrote:
> Thanks, that explains what I needed to know... Relative paths using a parent
> (..) or absolute paths aren't handled. So it won't work with my system,
> since all the build files point to a parent "sandbox" directory, not the
> current directory, for the dependencies...
You can use relative paths, but they are relative to the repository.
For example if I had a directory at svn://repos/foo/bar/barfoo and it
had svn:externals = ../foobar, it would be referring to
svn://repos/foo/bar/foobar.
Maybe you should read up on the book a bit. It sounds like you're
confused about what svn:externals do.
They check out a repository directory that is located elsewhere in the
repository into your current working directory. Let's take the above
project. It would checkout in your working directory the directory
svn://repos/foo/bar/foobar under directory barfoo in your working
directory.
What it sounds like you have is a build issue. That is, you have your
build referring to code that is not in your current working directory,
but happens to be located in a parent directory. That has nothing to
do with the svn:external property.
--
David Weintraub
qazwart@gmail.com
Re: Can we use relative paths in svn:externals propset?
Posted by David Bartmess <di...@edingo.net>.
On 4/29/2010 2:18 PM, Blair Zajac wrote:
> On 04/29/2010 01:09 PM, David Bartmess wrote:
>> I have two projects under a single repository, with A being dependent on
>> B being checked out.
>>
>> To set the svn:externals propset, can I use a relative path for the
>> checkout directory for the depending (B) directory?
>>
>> Such as :
>>
>> svn propset svn:externals "../buildsupport
>> http://<URL>/buildsupport/trunk" BuildScripts
>>
>> Will this work? I can't afford to try it on that repository since it's a
>> live development repository...
>
> You can always try setting up externals by modifying them in your
> working copy and running svn update and see if you get the desired
> result. You don't need to commit the change to test it.
>
> IIRC, you can't have a relative path to a directory outside the
> directory where the external is, as it doesn't know if it's a
> Subversion working copy or not.
>
> Blair
>
>
Thanks, that explains what I needed to know... Relative paths using a
parent (..) or absolute paths aren't handled. So it won't work with my
system, since all the build files point to a parent "sandbox" directory,
not the current directory, for the dependencies...
--
"Dingo" Dave Bartmess
Broomfield, CO. USA
http://edingo.net
Re: Can we use relative paths in svn:externals propset?
Posted by Blair Zajac <bl...@orcaware.com>.
On 04/29/2010 01:09 PM, David Bartmess wrote:
> I have two projects under a single repository, with A being dependent on
> B being checked out.
>
> To set the svn:externals propset, can I use a relative path for the
> checkout directory for the depending (B) directory?
>
> Such as :
>
> svn propset svn:externals "../buildsupport
> http://<URL>/buildsupport/trunk" BuildScripts
>
> Will this work? I can't afford to try it on that repository since it's a
> live development repository...
You can always try setting up externals by modifying them in your
working copy and running svn update and see if you get the desired
result. You don't need to commit the change to test it.
IIRC, you can't have a relative path to a directory outside the
directory where the external is, as it doesn't know if it's a Subversion
working copy or not.
Blair
Re: Can we use relative paths in svn:externals propset?
Posted by Olivier Sannier <ob...@free.fr>.
David Bartmess wrote:
> I have two projects under a single repository, with A being dependent
> on B being checked out.
>
> To set the svn:externals propset, can I use a relative path for the
> checkout directory for the depending (B) directory?
>
> Such as :
>
> svn propset svn:externals "../buildsupport
> http://<URL>/buildsupport/trunk" BuildScripts
>
> Will this work? I can't afford to try it on that repository since it's
> a live development repository...
Maybe you can afford to read the manual, it explains all this...