开发者

Update on each client

I have a SVN server running on Windows.

I need to force an update on every "working copy" (for each people using the svn repos) after a commit. I tried with a post-commit.bat script in the hook directory on the svn server. The problem is that the update occures on the server and not in the client file.

Here an extract :

    @ECHO OFF

SET REPOS=%1
SET REV=%2

SET DIR=%REPOS%/hooks

SET WORKING_COPY=c:\path\to\working\copy
svn update %WORKING_COPY%

Exemple : Person 1 : commit

开发者_开发知识库

post-commit Person 2 : update

If it's not possible, I would like to have at least on automatic update for the person 1. Person 1 : commit, then automatic update in his working copy.

I've seen the solution with a Windows Scheduled task, but it's my very LAST solution.

Can you help ? Thanks a lot.


SVN post-commit hooks are for server-side actions. You will not be able to control the other users who have checked out a copy of the repository.

You should just have everyone get in the practice of running svn update at the start of every day.


I think it's a very bad idea to update several working copies whenever something in the repository changes.

What's the reason you want this? And how will you make this scale?

Subversion is designed to work the same with an unlimited amount of working copies checked out. Pushing updates to each and every working copy at each commit makes each commit a very expensive operation.

Also consider what you'll do if certain client computers are turned off for instance.


I need to force an update on every "working copy" (for each people using the svn repos) after a commit.

I don't think an update of every "working copy" upon commit is possible - at least not without doing some horribly complex things.

If it's not possible, I would like to have at least on automatic update for the person 1.

Not sure WHAT you want to do exactly but if you are using Tortoise, it supports Client-side hook scripts. Maybe they could help (but they'll only help on the originating working copy). But as I said, I'm not sure I understood your exact needs.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜