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_at_gmail.com
Received on 2010-09-23 22:25:11 CEST