Stefan Sperling <s...@elego.de> writes: > On Thu, Feb 23, 2012 at 04:18:29AM -0800, leojhartiv wrote: >> >> We have an automated build process (enabled via jenkins) that creates a >> nightly tag and uses that tag to deploy the latest and greatest version of >> our app to SIT. Here are there we are getting a "file or directory is out >> of date" error. I find this confusing as I'm performing an SVN copy, which >> I thought was an all server-side command (doesn't depend on a workspace) and >> thus couldn't be out of date. >> >> Here's the command: >> svn cp --username=user --password=******** 'http://fromurl' >> http://tourl/tags/builds/4.1.3.0_20120223.0 -m 'Nightly build tag created by >> CI' >> svn: File or directory 'tags/builds' is out of date; try updating >> svn: resource out of date; try updating >> >> Any ideas on why this might be happening? > > Server-side copies can fail if they compete with concurrent commits. > > Recall that any commit to a node creates a new revision of the node's > parents in the repository. If a commit changes, for instance, /trunk/foo, > the following nodes will get a new revision in the repository: > > / > /trunk > /trunk/foo > > This is called "bubble-up process" and is described here in detail: > http://www.red-bean.com/kfogel/beautiful-code/bc-chapter-02.html > > A concurrent commit racing the copy operation can cause a new revision of > the destination 'tags/build', of '/tags', and of the root. > This can cause an out-of-date error because the copy operation is now > trying to modify out-of-date directories.
That's not correct, a commit does involve bubble-up changes but that doesn't stop concurrent commits. Look at the '1729' loop in svn_fs_fs__commit_txn, that will detect the race and retry the commit based on the new revision. You can get a conflict on URL-URL copies if two concurrent commits attempt to create the same destination URL, but that leads to a "Conflict at" error, not "out of date". I'm not sure how an URL-URL copy can trigger the original error. Is there any clue in the apache error log? Which version of Subversion on the client and server? Are you using serf or neon? Is there a master-slave write-through proxy involved? -- Philip