Subversion - Update Data from Repository2011/06/04 |
This is how to update data on server from Subversion's repository.
For this example, Update data under /var/www/html from repository.
This example based on that there are no data under the directory on server in initial operation.
|
|
[1] | It's necesarry to checkout to the data-directory as an initial operation on server. |
# svn co [repository] [a directory you'd like to update] [root@www ~]# svn co file:///var/www/svn/site /var/www/html |
[2] | Operate like follows to update data from repository. |
[root@www ~]# svn update /var/www/html U /var/www/html/policy.html Updated to revision 4. |
[3] | If you'd like to change properties of files, create a script like follows. |
[root@www ~]#
vi svn-update.sh
# update data and also change owner and permission of files
# this is an example #!/bin/bash svn update /var/www/html find /var/www/html -type d -print0 | xargs -0 chmod 705 chown -R fermi. /var/www/html while read FILE PERM do find /var/www/html -name "$FILE" -type f -print0 | xargs -0 chmod $PERM done <<EOL *.html 604 *.cgi 705 *.xml 604 *.jpg 604 *.gif 604 EOL chmod 700 svn-update.sh [root@www ~]# ./svn-update.sh U /var/www/html/note.cgi Updated to revision 9. |
Sponsored Link |
|