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

Locking: RFC: svn:needs-lock behaviors Part Deux

From: Brian W. Fitzpatrick <fitz_at_collab.net>
Date: 2005-02-03 21:01:01 CET

Based on everyone's feedback, here's my revised doc. There are a few
questions under Update.

svn:needs-lock behaviors:
=========================

Checkout:
- If svn:needs-lock is set on a file when the file is checked out, set
   the file to read-only.

Update:

- If svn:needs-lock is unset in wc, but update sets it:
   - If the file has local mods, print a warning and do nothing???
   - Else, set file to read-only.
- If svn:needs-lock is set in wc, but update unsets it: Set file to
   read-write.
- If svn:needs-lock is set or unset in both places: Do nothing.
- If svn:needs-lock is set and the lock is removed by update (i.e.,
   the lock in the wc was defunct):
   - If the file has local mods, print a warning and do nothing???
   - Else, set the file to read-only.

Propset:
- Setting the svn:needs-lock property does the following:

   - If the file is not locked, it sets the file to read-only.
   - If the file is locked, it does nothing.
   - If file has local mods, it does nothing (see Commit, below)
   - If the file is scheduled to be added, it does nothing (see Commit,
below)

   (Propset also canonicalizes the value to '*')

Propdel:
- Removing svn:needs-lock sets the file to read-write.

Propedit:
- If the property is changed via propedit, we need to canonicalize it
   to '*'.

Lock:
- If svn:needs-lock is set, the file is set to read-write.

Unlock:
- If svn:needs-lock is set, the file is set to read-only.

Copy:

- repos-to-wc or wc-to-wc copy: Ensure that the copy is read-write
    even if svn:needs-lock is set as this is another schedule add case.

Commit:
- If a file has the svn:needs-lock property set:
   - If file had local mods, set the file to read-only.
   - If file is being added, set the file to read-only.

Caveats:

- 'svn update' doesn't currently work on Windows if the working files
   are read-only, you will need to add some permission changing code.

-Fitz

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Feb 3 21:04:01 2005

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