Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 838
cnizzardini Avatar asked Dec 11 '10 02:12

cnizzardini


People also ask

How do I checkout a specific revision in svn?

Specify the subversion repository URL to check out, such as "https://svn.apache.org/repos/asf/ant/". You can also add "@NNN" at the end of the URL to check out a specific revision number, if that's desirable.

How do I export from svn?

To export a directory from a Subversion repository, do the following: In the main menu, select VCS | Browse VCS Repository | Browse Subversion Repository to open the SVN Repositories tool window. Right-click a directory you want to export and choose Export from the context menu.

What is the difference between svn checkout and export?

svn export simply extracts all the files from a revision and does not allow revision control on it. It also does not litter each directory with . svn directories. svn checkout allows you to use version control in the directory made, e.g. your standard commands such as svn update and svn commit .

How do I find svn revision?

To find information about the history of a file or directory, use the svn log command. svn log will provide you with a record of who made changes to a file or directory, at what revision it changed, the time and date of that revision, and, if it was provided, the log message that accompanied the commit.


1 Answers

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
like image 54
ajreal Avatar answered Sep 20 '22 14:09

ajreal