You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Hellen <he...@gmail.com> on 2008/03/12 18:15:28 UTC

auto switch for mirror side user

Hi,



I have a question about the "svn commit" from the mirror side.



For the standard way, a user from mirror side wants to check-in the change,
the user has to do the additional switch that from the mirror side to the
master side as "svn switch –relocate <from_URL> <To_URL> , then do the
commit.  Then switch back to the mirror side.


Is that possible to skip the switching part for the user at mirror side,
just do "svn commit" as if connecting to the master? Then at backend, put
the "svn switch – relocate .." in the pre-commit,  then after the commit to
master side is done, switch it back?


 I am not sure whether this is a good idea or not?   The environment here is
that everyone uses https connection to the server, no user has unix account
on either master or mirror system. The sync is running once an hour.

  The problem I'm current running into is: "svn info " doesn't work in
either pre-commit or start-commit, I can't get the current location of the
working copy while using "svn commit".



Any suggestion is welcome.


thanks in advance.

Hellen

Re: auto switch for mirror side user

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Mar 12, 2008, at 13:15, Hellen wrote:

> I have a question about the "svn commit" from the mirror side.
>
>
> For the standard way, a user from mirror side wants to check-in the  
> change,  the user has to do the additional switch that from the  
> mirror side to the master side as "svn switch –relocate <from_URL>  
> <To_URL> , then do the commit.  Then switch back to the mirror side.
>
>
>
> Is that possible to skip the switching part for the user at mirror  
> side, just do "svn commit" as if connecting to the master? Then at  
> backend, put the "svn switch – relocate .." in the pre-commit,   
> then after the commit to master side is done, switch it back?
>
>
>
>  I am not sure whether this is a good idea or not?   The  
> environment here is that everyone uses https connection to the  
> server, no user has unix account on either master or mirror system.  
> The sync is running once an hour.
>
>   The problem I'm current running into is: "svn info " doesn't work  
> in either pre-commit or start-commit, I can't get the current  
> location of the working copy while using "svn commit".
>

You can't really do it that way, because, as I said in another  
thread, the hook runs on the server but you are wanting a script that  
runs on the client.

But there is a different solution to let you commit things from a  
working copy that's checked out from a read-only mirror, and it's  
called a write-thru proxy. This feature will be available starting in  
Subversion 1.5. You can read about it here:

http://blogs.open.collab.net/svn/2007/10/yesterday-at-th.html




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org