Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Export SVN dir from one repository and commit to another one

Tags:

svn

We have an SVN repository which is stored online with all our tickets, wikis, etc. For deployment purposes, we need to use a second SVN repository on which we have no control: we cannot use svndump, svnload, svnsync, etc. We can update and commit basically.

At deployment time, I would like to export a working copy from Dev Repo and then commit it to Staging+Live repo. Please see following sketch for a rough idea of what I need to do.

SVN Workflow

Is there an SVN command doing just that? I could use the svn export command but then I would have to add all new files by hand I believe. Also, I would like to avoid to export all the files when only few changed. So I would like to avoid recreating the S working copy each time I want to deploy the site.

Or maybe there is a much simpler solution?

Best regards

like image 415
Korchkidu Avatar asked Apr 29 '11 07:04

Korchkidu


1 Answers

I'd suggest this approach:

  • create a working copy via svn co s+l_repo (initial checkout, can be done manually)
  • export your dev repo via svn export into this working copy, overwriting all files in it
  • add all new files via svn add --force
  • commit your working copy to s+l repo

Easily scripted, and you can run it via a batch job every night.

like image 94
Frank Schmitt Avatar answered Oct 12 '22 12:10

Frank Schmitt