Two args get passed to the commit script: the repository and the revision
number. You can use the svnlook command to then get a list of the files
that changed. Assuming you have set a variables REPOS and REV to match the
command line argument passed in you can run this command:
svnlook changed "$REPOS" -r "$REV"
There are other svnlook command you may want to play with as well (diff or
dirs-changed?). You can parse the output of this command (it's similiar to
the svn stat command output) to determine what files changed and thus what
directories must be updated on your dev web server. Just make sure you
handle deletes, adds, updates, and property changes if you need to.
Fyi...I didn't follow what you were doing on the development web server, but
for continuous builds, Hudson is a good build tool that will poll your
repository for you by project and redeploy your code. It sounds like you
may have a home grown solution doing something similar.
On Jan 24, 2008 6:22 AM, mary zhang <maryzhangca_at_hotmail.com> wrote:
> Hey, I am looking for some help for the issue of Synchronization between
> SVN server and Developement web server
> ---Developer work station: Windows XP install the TortoiseSVN
> ---SVN server: SVN 1.4.5 is installed in a independent server, development
> web server is separated with SVN server.
> ---SVN repository structure: multiple projects set up in the
> repository;under each project there is trunk, branch and tags folder.
> During the developing stage, developer check out the project from SVN
> server, and set up a working folder at the local machine, and when
> finish the work commit the changes to SVN server. For developer to
> view the changes there is web server host the site, we try to use the
> post-commit hook to synchronize between the SVN repository and
> development web server where the files are hosted. The synchronization
> seems works but one drawback is, each time the whole structure
> (folders and files) in the repository will be updated in development
> My question is:
> Which script pass the variables which I can use to identify which
> project the developer has committed and which file has been committed,
> that way and repository can just copy the file to temp folder then to
> updated in the development web server? Is any way to do this and how
> to do it? Thanks !
Received on 2008-01-24 19:12:15 CET