You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Ilja Golshtein <il...@yandex.ru> on 2005/09/19 10:13:53 UTC

export file with full path

Hello!

How to export a file from repository
preservings it's path?

Example.
I have two files named, say,
svn://ahost/aproject/trunk/aaa/bbb/myfile1
and
svn://ahost/aproject/trunk/ddd/eee/myfile2

I want to retrieve these two files from repo
and get following hierarchy
/tmp/aaa/bbb/myfile1
/tmp/ddd/eee/myfile2
where /tmp is existed directory
and neither aaa nor ddd do
not exist.

What is the best way to do this
really simple thing, considering the fact trunk 
contains a lot of files I am not interesting in?

Many thanks.

-- 
Best regards
Ilja Golshtein

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: export file with full path

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Sep 19, 2005, at 14:02, Ilja Golshtein wrote:

>> mkdir -p `dirname /tmp/aaa/bbb/myfile1`
>> svn export svn://ahost/aproject/trunk/aaa/bbb/myfile1 /tmp/aaa/bbb/
>> myfile1

[snip]

> I have some workaround in my Perl
> script (mkdir -p is not portable enough).
>
> The reason I am asking I cannot completely
> believe better way does not exist.

I'm not aware of a better way to do it, nor do I find this way so  
horrible...


On Sep 19, 2005, at 14:48, Ilja Golshtein wrote:

> Two more questions.
>
> 1. What does last "myfile1" mean? It it a part of svn export or  
> something?
> 2. Reproducing suggested command I've got
> "svn: Can't move '/tmp/aaa/bbb.3.tmp' to '/tmp/aaa/bbb': Is a  
> directory".
> Should I think solution works for directories only, not files?

Sorry about that; Mac OS X 10.4's insufferable Mail program inserts  
spaces
where they do not belong. There should have been no space between
"/tmp/aaa/bbb/" and "myfile1". Let me try again. The two commands are:

mkdir -p `dirname /tmp/aaa/bbb/myfile1`

svn export \
svn://ahost/aproject/trunk/aaa/bbb/myfile1 \
/tmp/aaa/bbb/myfile1



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: export file with full path

Posted by Ilja Golshtein <il...@yandex.ru>.
Hello!

>mkdir -p `dirname /tmp/aaa/bbb/myfile1`
>svn export svn://ahost/aproject/trunk/aaa/bbb/myfile1 /tmp/aaa/bbb/ 
>myfile1

Two more questions.

1. What does last "myfile1" mean? It it a part of svn export or something?
2. Reproducing suggested command I've got 
"svn: Can't move '/tmp/aaa/bbb.3.tmp' to '/tmp/aaa/bbb': Is a directory".
Should I think solution works for directories only, not files?

Thanks a lot.

-- 
Best regards
Ilja Golshtein

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: export file with full path

Posted by Ilja Golshtein <il...@yandex.ru>.
Hi!

>> How to export a file from repository
>> preservings it's path?

[skipped]

>> What is the best way to do this
>> really simple thing, considering the fact trunk
>> contains a lot of files I am not interesting in?
>
>mkdir -p `dirname /tmp/aaa/bbb/myfile1`
>svn export svn://ahost/aproject/trunk/aaa/bbb/myfile1 /tmp/aaa/bbb/ 
>myfile1
>
>mkdir -p `dirname /tmp/ddd/eee/myfile2`
>svn export svn://ahost/aproject/trunk/ddd/eee/myfile2 /tmp/ddd/eee/ 
>myfile2

Thanks for advice.

I have some workaround in my Perl
script (mkdir -p is not portable enough).

The reason I am asking I cannot completely 
believe better way does not exist.

-- 
Best regards
Ilja Golshtein

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: export file with full path

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Sep 19, 2005, at 12:13, Ilja Golshtein wrote:

> How to export a file from repository
> preservings it's path?
>
> Example.
> I have two files named, say,
> svn://ahost/aproject/trunk/aaa/bbb/myfile1
> and
> svn://ahost/aproject/trunk/ddd/eee/myfile2
>
> I want to retrieve these two files from repo
> and get following hierarchy
> /tmp/aaa/bbb/myfile1
> /tmp/ddd/eee/myfile2
> where /tmp is existed directory
> and neither aaa nor ddd do
> not exist.
>
> What is the best way to do this
> really simple thing, considering the fact trunk
> contains a lot of files I am not interesting in?

mkdir -p `dirname /tmp/aaa/bbb/myfile1`
svn export svn://ahost/aproject/trunk/aaa/bbb/myfile1 /tmp/aaa/bbb/ 
myfile1

mkdir -p `dirname /tmp/ddd/eee/myfile2`
svn export svn://ahost/aproject/trunk/ddd/eee/myfile2 /tmp/ddd/eee/ 
myfile2



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org