This documentation was written to describe the 1.7.x series of Apache™ Subversion®. If you are running a different version of Subversion, you are strongly encouraged to visit http://www.svnbook.com/ and instead consult the version of this documentation appropriate for your version of Subversion.
svn lock — Lock working copy paths or URLs in the repository so that no other user can commit changes to them.
Lock each TARGET
. If any
TARGET
is already locked by
another user, print a warning and continue locking the
rest of the TARGET
s. Use
--force
to steal a lock from another user
or working copy.
Lock two files in your working copy:
$ svn lock tree.jpg house.jpg 'tree.jpg' locked by user 'harry'. 'house.jpg' locked by user 'harry'.
Lock a file in your working copy that is currently locked by another user:
$ svn lock tree.jpg svn: warning: W160035: Path '/tree.jpg is already locked by user 'sally' in fi lesystem '/var/svn/repos/db' $ svn lock --force tree.jpg 'tree.jpg' locked by user 'harry'.
Lock a file without a working copy:
$ svn lock http://svn.red-bean.com/repos/test/tree.jpg 'tree.jpg' locked by user 'harry'.
For further details, see the section called “Locking”.