Force user to lock file in SVN before editing

Zooking picture Zooking · Feb 20, 2009 · Viewed 27.6k times · Source

We have some files in our project that can't be merged and hence the files must be locked by the users before editing them. Is there a way to force the user to lock a file before editing?

We are using Subversion and TortoiseSVN / VisualSVN.

Answer

cadrian picture cadrian · Feb 20, 2009

Two steps:

  • put the svn:needs-lock property on those files. That way they are check out read-only
  • when such a file must be modified, use the svn lock command and commit as usual

links: