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

Re: svn commit: r11334 - in trunk/notes: . locking locking/old

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2004-10-13 02:51:23 CEST

sussman@tigris.org writes:

> + 2. Lock restrictions
> +
> + If a file is locked, the owner of the lock has the exclusive
> + right to change the file's text and properties, to delete the
> + file, and to move the file.

"move the file"?

> +
> + If a directory is locked, the owner of the lock has the
> + exclusive right to change the directory's list of entries and
> + properties, to delete the directory, and to move the
> + directory. This lock applies recursively to all files and
> + directories under the locked directory.

"move the directory"?

What lock(s) do I require to move a file?

Case 1.

   $ svn lock dir/file1
   $ svn move dir/file1 dir/file2

- Is locking dir/file1 sufficent?
- Do I have to lock dir to create dir/file2?
- If I need to lock dir can do it without first releasing dir/file1?

Case 2.

   $ svn lock dir1/file
   $ svn move dir1/file dir2/file

- Is locking dir1/file sufficent?
- Do I also need to lock dir1?
- What about dir2, do I need to lock that to create dir2/file?
- If I don't need to lock dir2 what happens if someone else locks it
  between the move and the commit?

Case 3.

   $ svn lock dir/file1
   $ edit dir/file1
   $ svn lock dir/file2
   $ svn move dir/file2 dir/file3

- If I need to lock dir will I have to first release dir/file1 and
  will that mean I have to revert the changes in dir/file1?

FWIW, Clearcase requires a directory "lock" to create/remove elements.
Locking a file is not sufficent for it to be deleted. A directory can
be "locked" even if some of its files are already "locked".

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Oct 13 03:17:12 2004

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

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