Re: svn update or rsync - which is best to update live files
Guten Tag Christopher D Haakinson, am Freitag, 25. Februar 2011 um 20:39 schrieben Sie: My main question is: Which method is best for updating my live files? Should I use rsync in my post hook or should I use svn update? I would always prefer svn update and use tags for production software, this way your are able to version configurations, quickly needed fixes for errors etc. Mit freundlichen Grüßen, Thorsten Schöning -- Thorsten Schöning AM-SoFT IT-Systeme - Hameln | Potsdam | Leipzig Telefon: Potsdam: 0331-743881-0 E-Mail: tschoen...@am-soft.de Web: http://www.am-soft.de AM-SoFT GmbH IT-Systeme, Konsumhof 1-5, 14482 Potsdam Amtsgericht Potsdam HRB 21278 P, Geschäftsführer: Andreas Muchow
R: troubles running on Win 7 x64
Sorry for having posted the wrong mailing list. By the way, I tried both http:// and https:// with the same result. With svn:// the error is slightly different: it says 'can't connect to host' Any help? Paolo -Messaggio originale- Da: Branko Čibej [mailto:br...@xbc.nu] Per conto di Branko Cibej Inviato: sabato 26 febbraio 2011 20:29 A: d...@subversion.apache.org Oggetto: Re: troubles running on Win 7 x64 On 26.02.2011 12:36, Paolo Di Pietro wrote: Hi all, I just downloaded latest x64 version and try to installi it on my win 7 x64 running on a wmvare workstation. TortoiseSVN 1.6.12, Build 20536 - 64 Bit , 2010/11/24 20:59:01 Subversion 1.6.15, apr 1.3.8 apr-utils 1.3.9 neon 0.29.5 OpenSSL 0.9.8p 16 Nov 2010 zlib 1.2.3 No problem with the installation, but after restarting it is not able to connect to the server. The server is sunning on another machine on the network, and I can connect with my other installations running on windows 7 x32 running on the same vmware. There is no apparent error, but the repo browser option have been there, with no answer, all over the night. On the same time, I saw a lot of traffic from my NAS, traffic going back to normal usage after I killed the repo browser process. I also installed the same x64 version on the host machine, a quadcore x64 workstation running Win/ ultimate. In this case I cannot connect to the server, but the response was different, giving the following message. Command: Checkout from http://silv.eidos.local/svn/arianna/arianna-2011/trunk, revision HEAD, Fully recursive, Externals included Error: Server sent unexpected return value (501 Not Implemented) in response to Error: OPTIONS request for 'http://silv.eidos.local/svn/arianna/arianna-2011/trunk' Finished! Anyone can help or have any suggestion? Yes, ask on the users@subversion.apache.org mailing list, which is the right one to answer support questions on. But before you do that, try replacing that http:// with svn://. -- Brane
Re: svn update or rsync - which is best to update live files
On Feb 25, 2011, at 13:53, Blair Zajac wrote: On 2/25/11 11:39 AM, Christopher D Haakinson wrote: Now I've come to the point in my development where I need to figure out what's the best method for transferring my svn files to my live site. I've read that I should use a post-commit hook, which is fine I'm using a pre-commit hook already so I'm aware of how they work. My main question is: Which method is best for updating my live files? Should I use rsync in my post hook or should I use svn update? http://subversion.apache.org/faq.html#website-auto-update this page recommends using svn update, but I wanted to get some input from the community too. Thanks in advance! First, both svn and rsync do atomic replaces of the file, so you don't have to worry about the live files being observed in some odd state. Of course you do. The individual files may be atomically replaced, but the entire set of files won't be. If, like most web sites, your site is made with a scripting language, and file A includes file B, and both files have been changed, there will probably be a time during the update when A has been updated and B has not, or vice versa. Here is a previous discussion with recommendations. See especially the paragraph that starts For finally deploying a site to the production server and the example that follows: http://svn.haxx.se/users/archive-2009-04/0083.shtml We manually ran a script on the production server when we wanted to deploy a tag there. If you want to do automatic deploys in the post-commit hook of the repository server, for example in response to creating a tag with a particular naming format, then the SVN::Notify::Mirror perl module will help you do that. Its author has explained its use on this mailing list many times, for example here: http://svn.haxx.se/users/archive-2006-02/1148.shtml
Re: svn update or rsync - which is best to update live files
On Feb 26, 2011, at 17:26, Blair Zajac wrote: On Feb 26, 2011, at 2:47 PM, Ryan Schmidt wrote: On Feb 25, 2011, at 13:53, Blair Zajac wrote: First, both svn and rsync do atomic replaces of the file, so you don't have to worry about the live files being observed in some odd state. Of course you do. The individual files may be atomically replaced, but the entire set of files won't be. If, like most web sites, your site is made with a scripting language, and file A includes file B, and both files have been changed, there will probably be a time during the update when A has been updated and B has not, or vice versa. Well, you're going past the original question. Neither rsync nor svn help with that case, as there aren't atomic updates to sets of files, which you state in the thread linked below. Here is a previous discussion with recommendations. See especially the paragraph that starts For finally deploying a site to the production server and the example that follows: http://svn.haxx.se/users/archive-2009-04/0083.shtml Right, the symlink approach gets you 90% there. But even this doesn't get you 100% of the way there, if the browser downloads C and D and in between the symlink is changed (not talking about when A includes B that is a single GET). Heck, there's even the problem of the web app changing between requests. What if you log into the web app when it is at version A, and then update to version B which introduces changes in the login procedure which cause additional data to be stored in the session with the login? Users who already logged into the app with version A will now be running around version B of the app without this additional information in their session, until they log out and back in. There's tons of what if scenarios that should be considered. In our case, we decided that we did not want the app's files on the server in an inconsistent state for the possibly minutes it could take to run an svn up. We decided that the millisecond it takes to delete a symlink and create a new one was a much more acceptable situation for us. YMMV.
Re: Can't commit perl code
On Feb 26, 2011, at 16:18, Nate wrote: Steps to reproduce: 1) created a new repo in /opt/svnrepo using the following command: svnadmin create myproject 2) Next I checked out the client on my workstation (I've tried it on a Mac and a Linux Centos 5.5 system) svn co https://myserver.whatever.com/repopath/reponame reponame 3) cd reponame 4) I copied the mason files (autohandler, dbhandler) and the other .html files into the reponame from the server 5) svn ci Here's what I keep getting and I haven't found any way around it (for those who say: Just Google it, I invite you to find me solution that actually works, most haven't!) Adding autohandler svn: Commit failed (details follow): svn: Server sent unexpected return value (500 Internal Server Error) in response to PROPFIND request for '/repos/acutrans/!svn/wrk/123df6d8-1458-42ca-bb69-a1f438f3ee78/autohandler' svn: Server sent unexpected return value (500 Internal Server Error) in response to PROPFIND request for '/repos/acutrans/autohandler' svn: Your commit message was left in a temporary file: svn:'/home/nathanb/acutrans/svn-commit.3.tmp' This keeps happening over and over on the same file. It does the same thing to .mas files as well. I am guessing there is some kind of global rule in your Apache configuration file, or an applicable .htaccess file, that has a rule that is causing this problem. (A rule probably meant for some entirely other purpose, but which is also having an effect for your Subversion commits.) See for example previous messages on this list like: http://svn.haxx.se/users/archive-2008-07/0944.shtml
Re: svn update or rsync - which is best to update live files
OK, There is one way that works. I'd suggest using it. Most server OSes now have some way to make a virtual hoist. Solaris has zones, Linux has xen and there is VMware. The idea is that you build the new updated web site on a new virtual host. and then you test it. Once you like the tst results you swap IP addresses. You don't really want to go live with changes that are untested. The IP address is atomic in that the entire site goes live at once. BTW I've always liked the way Solaris does this in that you can have many zones each with their own IP address and file system but there is only one instance of the operating system running on the hardware. I always thought it a waste to have multiple copies of the same software in RAM, Sun solved that problem well. -- = Chris Albertson Redondo Beach, California
Re: ^M Appends to every line?
On 2/24/2011 8:02 AM, Christopher D Haakinson wrote: OK, so I've been testing out the svn:eol-style prop and it appears to work, but it seems like an awful lot of work for such a simple issue. Is there something server-side I can setup to ensure that all files contain the correct eol style? As others have said, you can use a pre-commit script to check the files. If you have a number of files already checked in that you want to update their properties, you can use the svn_apply_autoprops.py script that I wrote a while back on a working copy to fix up everything in one commit: http://svn.apache.org/repos/asf/subversion/trunk/contrib/client-side/svn_apply_autoprops.py Regards, Blair