Deploying with SVN

2

I need to set up my environment to do PHP code versioning, but I'm not sure where to start. The repository on the Linux / Apache server is created and I already installed Tortoise on my machine and then started the questions.

1) Which directory to use locally?

For example, my current directory /localhost/app and I have the code there then:

a) I must create SVN in the same folder (because that's where I'm going to change it) and then do the checkout , or

b) I need to have a 'share' directory for SVN, and after all ok in localhost , copy to SVN folder via xcopy checkout ?

2) Remote Sync

When uploading the files and the version is 'worth', I'll be playing the files in /srv/svn on the server, but to really be worth the right it was to play for /srv/httpd/app for example, how should I do to override current version for this one I just uploaded?

    
asked by anonymous 05.07.2018 / 16:47

1 answer

1
  

Which directory to use locally? For example, my current directory / localhost / app and I have the code there then: a) I must create SVN in the same folder (because that's where I'm going to change it) and then checkout, or b) I must have a ' 'to SVN, and after all ok on localhost, copy to SVN folder via an xcopy and then run checkout?

A - I do not see why doing B under normal conditions, but if you have some plausible reason you can do it. Do nothing without reason, as you see no motive, and many will not see, do the A.

  

2) Remote sync? When I upload the files and the version is 'worthy', I'll be playing the files in / srv / svn on the server, but to really be worth the right it was to play to / srv / httpd / app for example, how should I do to overlap the current version for this one I just uploaded?

I do not know if I understand, especially what is "worth". You will have a folder with the project on your machine and a folder with the project on the server, ready, there is nothing left. Has the SVN running on the 2, already been configured, just have to use SVN command to synchronize between them. This is the part of SVN.

If you are talking about deploy , that is the deployment in production, there is often a mechanism that takes care of this when it should deploy , in many cases it is not just copying to the place where it will run, has some script that takes care of it. But if it's just copying, then leave a xcopy in the palm of your hand to do deploy.

    
05.07.2018 / 17:50