cnizzardini
cnizzardini

Reputation: 1240

SVN - How to Export Just a Revision

I have SVN setup on my local computer (Ubuntu) which I use for development and an SVN client running on a shared host box which I use a staging server, also my production server has the same setup. When I do an export, the entire project is getting exported which is absurd for small version release. I use the following command:

svn export -r 31 http://localhost.com/proj/trunk . --force --username myusername

And the entire project is exported once again. So I try a different way:

svn export -r 'COMMITTED' http://localhost.com/proj/trunk . --force --username myusername

I then get this error:

svn: 'http://localhost.com/egr' is not a working copy
svn: Can't open file 'http://localhost.com/proj/.svn/entries': No such file or directory

I wonder if I am just not using the correct SVN export command or if there is something inherently wrong with my SVN setup (this is my first time configuring SVN).

dav_svn.conf:

  <Location /proj>
 DAV svn
 SVNPath /var/svn/proj/
 AuthType Basic
 AuthName "SVN Repo"
 AuthUserFile /etc/subversion/passwd
 <LimitExcept GET PROPFIND OPTIONS REPORT>
    Require valid-user
 </LimitExcept>

Ideas? Please advise.

Upvotes: 12

Views: 26690

Answers (2)

ajreal
ajreal

Reputation: 47321

You can specify the folder/files that you want to export only, like

such as using wp svn

svn export -r 16873 http://core.svn.wordpress.org/branches/2.8/wp-admin/css

If just few files but located on different directories

mkdir {css,image}
svn export -r 16873 http://core.svn.wordpress.org/branches/2.8/wp-admin/css/install.css css/install.css
svn export -r 16873 http://core.svn.wordpress.org/branches/2.8/wp-admin/images/menu-arrows.gif images/menu-arrows.gif

Upvotes: 14

mariana soffer
mariana soffer

Reputation: 1853

You shouldn't use svn export if you want to update the project, you should use svn commit that sends changes from your working copy to the repository.

I was wondering Why are you using the -r 31 option this stands for revisions and the amount of them which are 31. Probably the option you want to invoke is the -R option which stands for recursing the directories.

Upvotes: 0

Related Questions