[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Switch and File Modification in Atomic Manner?

From: Michael Caplan <michael.caplan_at_henryschein.com>
Date: Sun, 22 Jun 2008 19:29:37 +0000 (UTC)

Hi there,

I'm looking for some information on how the switch command actually goes about
updating files. Basically, I'm looking at using SVN and switch in order to
update code in a sandbox on a website. The concern is serving up half written
files while the switch command is running.

Does "switch" replace the files in an atomic manner on the file system so that
half written files are not served?

The PHP APC docs explain the issue best:

“When you modify a file on a live web server you really should do so in an
atomic manner. That is, write to a temporary file and rename (mv) the file into
its permanent position when it is ready. Many text editors, cp, tar and other
such programs don’t do this. This means that there is a chance that a file is
accessed (and cached) while it is still being written to. ... The unfortunate
person who accessed this half-written file will still see weirdness... ” -
http://ca3.php.net/manual/en/apc.configuration.php

I looked at the SVN docs and can’t find any details on the method used to update
files when running switch.

Anyone know?

Thanks,

Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-06-22 21:35:31 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.