tags:

views:

27

answers:

1

When exporting in SVN, SVN not only ignores .svn directories (as it should), it also ignores all empty directories. Is there a way around this? I've been searching forever with absolutely no luck. Yes 'svn co' will grab them, but we'd much prefer 'svn export' for various reasons.

Thanks so much.

A: 

I think you version of svn is a bit old. I tried the same in my local box and find it working.

<snip>
sivakumar@sivakumar-laptop:/tmp$ svn export https://xxx/svn/repos/xxx/branches/release/x.0.1.0/build/dummy/
A    dummy
A    dummy/app0
A    dummy/app1
A    dummy/app2
Exported revision 43925.
sivakumar@sivakumar-laptop:/tmp$ ls dummy/app2
sivakumar@sivakumar-laptop:/tmp$ cd dummy/app2/
sivakumar@sivakumar-laptop:/tmp/dummy/app2$ ls
sivakumar@sivakumar-laptop:/tmp/support/tomcat$ svn --version
svn, version 1.6.6 (r40053)
   compiled Dec 12 2009, 05:04:54

Copyright (C) 2000-2009 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).

The following repository access (RA) modules are available:

* ra_neon : Module for accessing a repository via WebDAV protocol using Neon.
  - handles 'http' scheme
  - handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
  - with Cyrus SASL authentication
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme
</snip>

This is the commit, which fixed this problem http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/export.c?view=log&amp;pathrev=846726

Alternatively you can think of adding some dummy file if you are constrained by the version you are using. BTW, newer svn clients does with with older svn server.

Version Control Buddy
I have exactly the same version as you do and my export does not get empty directories. I ended up adding a .placeholder file in each of the directories and then automatically deleted all .placeholder files in the build command after the export. Hacky, but it worked.
Spyplane