HI
i have currently started to deploy code into our production environment from the the dev environment, we deploy code on to the production from the svn , ( i do a svn export ) , some times not code is checked into the svn and it does not throw me a error .
is there a way i can verify or write a script to check each file that is in the SVN is same as that in the dev environment .
From: Agnello George agnello.dsouza@gmail.com
i have currently started to deploy code into our production environment from the the dev environment, we deploy code on to the production from the svn , ( i
do a svn export ) , some times not code is checked into the svn and it does not throw me a error . is there a way i can verify or write a script to check each file that is in the
SVN is same as that in the dev environment .
Maybe you should ask on the svn mailing list... But if you do an 'svn diff' in dev, it should compare dev to what is in the repo... no?
JD
You should better ask this on an SVN list. Thanks.
Kai
On 19 January 2011 06:09, Agnello George agnello.dsouza@gmail.com wrote:
is there a way i can verify or write a script to check each file that is in the SVN is same as that in the dev environment .
find . -type f | grep -v .svn | xargs md5sum
then diff the output from each server.
On 19 January 2011 06:09, Agnello George agnello.dsouza@gmail.com wrote:
is there a way i can verify or write a script to check each file that is in the SVN is same as that in the dev environment .
find . -type f | grep -v .svn | xargs md5sum
Obviously the above will compare the export vs. your dev env. The SVN will always have the correct version, otherwise you have a much serious problem than you think you have. Check the export branch and the dev branch, I wonder if you are working against the same branch.
On Wed, Jan 19, 2011 at 5:10 AM, Hakan Koseoglu hakan@koseoglu.org wrote:
On 19 January 2011 06:09, Agnello George agnello.dsouza@gmail.com wrote:
is there a way i can verify or write a script to check each file that is in the SVN is same as that in the dev environment .
find . -type f | grep -v .svn | xargs md5sum
then diff the output from each server.
rsync -avh --delete --exclude=.svn --dry-run ./ server:targetdir/
Is much, much, faster and more reliable. Using non-specific regexp commands likg "grep -v .svn" is begging to exclude files named "filename.svn.txt", which you may or may not care about. And "md5sum" won't report changes in symlinks reliably, nor changes in permissions or ownership.
On Wed, Jan 19, 2011 at 12:09 AM, Agnello George agnello.dsouza@gmail.com wrote:
i have currently started to deploy code into our production environment from the the dev environment, we deploy code on to the production from the svn , ( i do a svn export ) , some times not code is checked into the svn and it does not throw me a error .
is there a way i can verify or write a script to check each file that is in the SVN is same as that in the dev environment .
You should design a process where the only way to get things to work is to go through svn. That is, check in from the dev location(s), check out in a staging/test environment where you build and test but never edit anything, then push to production. And in general, I'd prefer an 'rsync -C' from the staging checkout to an export from the svn server - that lets you do an 'rsync -Cn' to verify that the contents are identical between staging and production and an 'svn status' or 'svn diff' to check staging against the repository. And if something isn't checked in, it basically doesn't exist.
Les Mikesell wrote:
On Wed, Jan 19, 2011 at 12:09 AM, Agnello George agnello.dsouza@gmail.com wrote:
i have currently started to deploy code into our production environment from the the dev environment, we deploy code on to the production from the svn , ( i do a svn export ) , some times not code is checked into the svn and it does not throw me a error .
is there a way i can verify or write a script to check each file that is in the SVN is same as that in the dev environment .
When I designed a development environment at one telecom I worked for, I followed std. practice: there is a nightly build of *everything*, all scripted to extract from the version control system and build. Then, in the makefiles, I used VPATH to let the developers look a) at their local directories; b) at test for files not in the local directory, and c) at the directory heirarchy where the nightly production build was.
ObRant: I would *never* let anyone check a file out for editing without locking it....
mark
On Wed, Jan 19, 2011 at 1:09 AM, Agnello George agnello.dsouza@gmail.com wrote:
HI
i have currently started to deploy code into our production environment from the the dev environment, we deploy code on to the production from the svn , ( i do a svn export ) , some times not code is checked into the svn and it does not throw me a error .
is there a way i can verify or write a script to check each file that is in the SVN is same as that in the dev environment .
I'm something of a Subversion expert. (Years of professional work with it.)
There is *no way* to force people to check in their code. That's one issue.
The other is that you've discarded all the Subversion information when you use "svn export". Instead, maintain a working copy that you update or lock to a particular release, and do "rsync -avH --exclude=.svn --delete working-dir/ targetdir/ --dry-run". You can also use this command, without the "--dry-run" to actually publish the code from your working copy, and even integrate this as a "post-commit" for a working repository to be kept up-to-date at all times.
I actually know people who do this for some development code, so the code publication is automatic when they submit code ot the trunk.