Calling Subversion Gurus…

general Add comments

Any subversion gurus out there? We have what seems a simple operation but can’t figure out how to perform it. Basically, we want to export files for a specific revision - not the whole repository, just the ones in a revision. If we do a ’show log’ we can see the files we want but (using Subclipse) but how do we export them? - and no, we can’t just walk down the history and pull them out one by one…

7 Responses to “Calling Subversion Gurus…”

  1. phill.nacelli Says:

    Hi John,

    Using Subclipse, got to Window –> Open Perspective –> Other… and select the "SVN Repository Exploring" from there you should already have your repository added (if you are already using Subclpse), expand your repo to the folder you want to export and right click –> Export…
    An export window will open and from there you’ll see a section titled "Revision" check the "Revision" checkbox and enter the revision number you want to export to. In that same window above you can select where you want to export this to on your local or mapped drive. Personally I use an ANT script to do this sort of tasks for me and push any export to my servers, if you want to know more about how to do it, feel free to contact me at pnacelli [at] aboutweb.com.

    Hope this helps..

    Cheers..

  2. Matt Perdeaux Says:

    Check this out - http://instantbadger.blogspot.com/2004/07/general-ant-build-and-release-scripts.html - it won’t export a particular revision, but will export all files added/edited after a specified date

  3. johnb Says:

    Hi guys, thanks for the speedy replies. I think i got my subversion syntax incorrect. When we view the history of a project we can see the files that have been changed for that commit - it’s those files that we want, not the whole project? When i try what you suggest phill i get the whole site back - but Matt’s suggestion may have better results for us…

  4. Mark Phippard Says:

    There is no SVN command to extract the files changed in a specific revision. You can produce the diff for the revision, you can see the log for the revision, but you cannot export the files for the revision.

    One thing you can do is get the list of files changed in the revision using log or diff and then iterate over that list using svn cat to get the files contents at that revision.

  5. LucasS Says:

    You should be able to use the command line version of SVN to do this.
    I think the command is svn export -r REVNUMBER svnurl

    let me know how it goes

  6. Terry Schmitt Says:

    I’m a little late to this party, but here are my 2 cents.
    While Developing in Windows I have always used TortoiseSVN instead of one of the eclipse plugins.
    Tortoise will allow you to select 2 revisions, view the changes between the 2 revisions and then export just the changes. This has been my normal mode of operation when updating a production site. My thinking is that if you only update 3 files, why upload the entire site?
    My current issue is that I’m now using Eclipse on Linux, so I’m stuck with using Subclipse and can’t find a solution either.

  7. Mike Henke Says:

    Subversion Ant for Files Changed between Two Revision Numbers - http://tinyurl.com/4lmjoq

Leave a Reply

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in