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

Re: Can you set properties on a file without having it checked out?

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2005-05-12 19:11:44 CEST

On May 12, 2005, at 11:22 AM, David Weintraub wrote:

>
> By the way, I was too shocked by the fact that I cannot add or modify
> properties to files without a working directory. I can make
> directories, copy files, etc. without a working directory, but
> apparently I can not add or change properties.
>

Nor can you change a file's text without a working copy. It's a
safety feature.

If you were able to run 'svn propset color green fileURL', or 'svn
put localfile fileURL', then you might overwrite changes that you've
never seen. The race condition exists simply because Subversion is a
concurrent versioning system: somebody might have committed new
changes to the file one second before you execute your upload... and
blam, you've just overwritten somebody else's changes without
realizing it.

By using a working copy, this situation cannot happen. 'svn commit'
always declares the version of the file that's being changed, and
thus the repository can instantly reject the commit if something
newer just came in.

That said, there *is* an svnput.c example file in svn's source tree.
It does what you think, but it's plastered with these same warnings.
Use at your own risk.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu May 12 19:53:51 2005

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.