3

I need to export a single file from SVN. My structure might look like this:

- trunk
   - file.py
   - anotherfile.py
   - folder
      - stuff.py
   - anotherfolder # <-- External!
      - magic.py

I'd like to be able to download any of these single .py files, given the structure. For example, any of these should work:

/trunk/file.py
/trunk/anotherfile.py
/trunk/folder/stuff.py
/trunk/anotherfolder/magic.py

For the first three, I understand I can use svn export like this:

> svn export http://host.xyz/trunk/folder/stuff.py c:\stuff.py

But this doesn't work if the file is in an external:

> svn export http://host.xyz/trunk/anotherfolder/magic.py c:\magic.py
svn: E170000: URL 'http://host.xyz/trunk/anotherfolder/magic.py' doesn't exist
Dnouna
  • 31
  • 2

1 Answers1

0

I ended up using one of the answers from How to check out SVN external URL directly? by finding out the target URL + target revision via...

svn propget svn:externals http://svn/myurl/

...and then using that target URL + revision to export the file.

YZN3RF
  • 93
  • 1
  • 3