think tank forum

technology » svn help

sriehl's avatar
16 years ago
link
sriehl
surreal
so I'm setting up a cron job to back up the tracker and my site. . .
If I create a file, it won't be updated because it says its not versioned. Is there a switch I can use to commit EVERY file (only if its not the same version) in the directory?
lucas's avatar
16 years ago
link
lucas
i ❤ demo
i don't think you want to use svn like this.

if you want to simply backup files on a server, use rsync or duplicity.

if you want to use svn correctly to streamline the development of a live website, here's how:

set up a repository tree like this:
/trunk
/branches
/branches/live
/branches/stable
/tags

01. checkout (CO) a working copy (WC) of /trunk to your local machine.
02. make changes to your local WC.
03. commit your changes to /trunk.
04. when you have reached a stable point in development, merge the /trunk changes into /branches/stable.
05. on a testbed (that replications your production environment, export /branches/stable.
06. perform testing (QA).
07. make any necessary remaining changes to /trunk.
08 .merge these changes to /branches/stable.
09. when you are satisfied and ready to go live with the changes, merge /branches/stable into /branches/live.
10. export /branches/live to your production server(s).
11. repeat 01-10 as necessary.
12. copy /branches/live to /tags/version to mark versions of the software and checkpoint your development.

i live by this. i hope you find it useful.
lucas's avatar
16 years ago
link
lucas
i ❤ demo
i like my batch script a lot for using multiple svn repositories locally.

@ECHO OFF
cd "C:\"
ECHO Updating repository: classes
svn update "C:\Documents and Settings\lucas\My Documents\classes"
ECHO.
ECHO Updating repository: ga
svn update "C:\Documents and Settings\lucas\My Documents\ga"
ECHO.
ECHO Updating repository: journal
svn update "C:\Documents and Settings\lucas\My Documents\journal"
ECHO.
ECHO Updating repository: ttf-live
svn update "C:\Documents and Settings\lucas\My Documents\ttf-live"
ECHO.
ECHO Updating repository: ttf-src
svn update "C:\Documents and Settings\lucas\My Documents\ttf-src"
ECHO.
ECHO Updating repository: wlw-live
svn update "C:\Documents and Settings\lucas\My Documents\wlw-live"
ECHO.
ECHO Updating repository: wlw-src
svn update "C:\Documents and Settings\lucas\My Documents\wlw-src"
ECHO.
ECHO Updating repository: data
svn update "C:\data"
ECHO.
ECHO Checking for uncommitted files...
ECHO.
svn status "C:\Documents and Settings\lucas\My Documents\classes"
svn status "C:\Documents and Settings\lucas\My Documents\ga"
svn status "C:\Documents and Settings\lucas\My Documents\journal"
svn status "C:\Documents and Settings\lucas\My Documents\ttf-live"
svn status "C:\Documents and Settings\lucas\My Documents\ttf-src"
svn status "C:\Documents and Settings\lucas\My Documents\wlw-live"
svn status "C:\Documents and Settings\lucas\My Documents\wlw-src"
svn status "C:\data"
ECHO.
ECHO Done.
ECHO.
PAUSE
lucas's avatar
16 years ago
link
lucas
i ❤ demo
do you next level?

http://en.wikipedia.org/wiki/Distributed_revision_control
lucas's avatar
14 years ago
r1, link
lucas
i ❤ demo
this post has been archived.