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

Re: Locking: RFC: svn:needs-lock behaviors (Updated)

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2005-02-02 23:49:55 CET

"Brian W. Fitzpatrick" <fitz@collab.net> writes:

> 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.

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

> Update:
> - If svn:needs-lock is unset in wc, but update sets it: Set file to
> read-only.

1. Even if the file has local mods? I wonder if 'svn revert' works on
   Windows if the working file is read-only.

2. What about:

    svn lock foo
    svn ps svn:needs-lock '*' foo
    svn ci --no-unlock foo
    svn up -rCOMMITTED-1 foo
    svn up -rHEAD foo

  Is the -rCOMMITTED-1 update allowed? If so, then the -rHEAD update
  causes svn:needs-lock to become set while the working copy already
  holds a lock.

> - 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 in both places and the update breaks a
    lock: Make the file read-only. Even if locally modified?

> Propset:
> - Setting the svn:needs-lock property sets the file to read-only
> (It also canonicalizes the value to '*')

1. Not if the file is locked in the current wc.

2. What about schedule add files? I don't think they can be locked so
   they should remain read-write.

> 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.

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.

Philip Martin
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Feb 2 23:51:10 2005

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.