You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Charan <ch...@gmail.com> on 2010/09/23 19:41:50 UTC
syncing two directories with SVN repository.
Hi,
I have two requirements but I'm not sure whether SVN is capable of doing it
1. syncing two directories
Suppose I have two directories like *
http://192.168.15.2/svn/develop/data/docs/* and *
http://192.168.15.2/svn/deploy/data/docs/. *Developers always update 1st url
and svn should be able to sync the 2nd url with the 1st url updates. Is this
really possible with svn commands ?(I don't think so). Even if I want to use
some cronjob which can do this , there are some hundreds of directories like
this which will hectic for me to use a cron job.
2. Standard SVN tree structure
Suppose I have the below url
*http://192.168.15.2/svn/develop/data/docs/trunk/<files>*
sometimes developers tend to check in files directly to*
http://192.168.15.2/svn/develop/data/docs/<files> which I want to avoid this.
Is this possible?. They should only check in within docs/trunk/ otherwise
svn shouldn't allow check in directly to docs/.*
*
*
Thank You
Re: syncing two directories with SVN repository.
Posted by Ryan Schmidt <su...@ryandesign.com>.
On Sep 23, 2010, at 14:41, Charan wrote:
> I have two requirements but I'm not sure whether SVN is capable of doing it
>
> 1. syncing two directories
> Suppose I have two directories like http://192.168.15.2/svn/develop/data/docs/ and http://192.168.15.2/svn/deploy/data/docs/. Developers always update 1st url and svn should be able to sync the 2nd url with the 1st url updates. Is this really possible with svn commands ?(I don't think so). Even if I want to use some cronjob which can do this , there are some hundreds of directories like this which will hectic for me to use a cron job.
If those are working copies of the same place in the same repository, then you can run "svn up" to sync both of them with the server. If these hundreds of directories are all within a common repository parent, you can just "svn up" the parent. If not, you'd have to "svn up" each of them.
> 2. Standard SVN tree structure
> Suppose I have the below url
> http://192.168.15.2/svn/develop/data/docs/trunk/<files>
> sometimes developers tend to check in files directly to http://192.168.15.2/svn/develop/data/docs/<files> which I want to avoid this. Is this possible?. They should only check in within docs/trunk/ otherwise svn shouldn't allow check in directly to docs/.
You can write a pre-commit hook to prevent that.
Re: syncing two directories with SVN repository.
Posted by Les Mikesell <le...@gmail.com>.
On 9/23/2010 2:41 PM, Charan wrote:
> Hi,
>
> I have two requirements but I'm not sure whether SVN is capable of doing it
>
> 1. syncing two directories
> Suppose I have two directories like
> *http://192.168.15.2/svn/develop/data/docs/* and
> *http://192.168.15.2/svn/deploy/data/docs/. *Developers always update
> 1st url and svn should be able to sync the 2nd url with the 1st url
> updates. Is this really possible with svn commands ?(I don't think so).
> Even if I want to use some cronjob which can do this , there are some
> hundreds of directories like this which will hectic for me to use a cron
> job.
If both of these are working directories, you can make changes in one,
commit, then update the other to sync the changes. But this isn't a
particularly good use of a version control system. Rsync over ssh can
do a good job of pushing copies elsewhere unless you also care about
preserving history.
A better model might be to commit from any working copy you like, but
have the only way to get data to the actual production directory be to
update a working copy in a staging area where you can perform some
sanity checks, then rsync from there to all production locations - which
you can do in a simple script that uses the -C option with rsync to
avoid copying the .svn metatdata.
> 2. Standard SVN tree structure
> Suppose I have the below url
> *http://192.168.15.2/svn/develop/data/docs/trunk/<files>*
> sometimes developers tend to check in files directly to*
> *http://192.168.15.2/svn/develop/data/docs/<files> *which I want
> to avoid this*. *Is this possible?. They should only check in within
> docs/trunk/ otherwise svn shouldn't allow check in directly to docs/.*
You can use path-based authorization to control where people can write.
--
Les Mikesell
lesmikesell@gmail.com