Last updated April 18, 2011 12:21, by ovrabec
Feedicon  

Lock/Unlock feature wanted by subversion users. See 95177. This page summarizes the needs, scenarios and possible solutions for the feature.

Scenarios, actions and basic UI requirements

Lock user action

  • locks (attempts to lock) a set of files
  • equivalent for svn lock [--force] [-m comment] files

UI

  • a dialog with a message text-area, recent messages and templates
  • --force option displayed only when any file locked remotely or display a warning dialog when the lock fails?

Unlock user action

  • unlocks (attempts to unlock) a set of files
  • equivalent for svn unlock [--force] files

UI

  • probably no UI, just unlock all locked files
  • when a file is locked remotely, display a warning dialog offering --force?
  • should work recursively

Annotations

Locked files should be annotated accordingly.

Notes

  • We cannot annotate such files with color. Such a file can be both modified and locked, we would need to display both colors. What about having every first letter blue (modified) and every second letter e.g. yellow (locked). That would be a nice discotheque.
    • Will be annotated only with a label - visible in projects view with Show versioning labels on and always in the versioning view
  • The fact that a file is locked by another user may be acquired only from a server, so we need to do some net operations. So i suggest display the status only when a remote status is called (a refresh in the versioning view with the remote changes mode)
  • We need to come with a label annotation for remotely and locally locked status
    • K for local and O for remote?

On demand locking

Although locked files are not set to read-only by default, subversion offers an option. Every file that has the property svn:needs-lock set is by default set to read-only in an unlocked state. To be able to edit the file one needs to acquire a lock on that file. For such files we need to find a way to make them writable on demand.

Notes

  • When user starts editing a file, we need to check if the file is read-only and if the svn:needs-lock property is set. In such case contact the server and attempts to lock the file in background.
  • How about the refactoring? Refactoring runs outside of AWT, the file will be locked during the refactoring process.
  • There will be an option in Tools->Options: "Automatically lock files with svn:needs-lock property".

Project Features

Wiki Controls

About this Project

VersionControl was started in November 2009, is owned by tpavek, and has 102 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20160708.bf2ac18). © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close