This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Get SVN File Locks

To ensure users remember to get a lock on model files before editing, you can configure SVN to make model files read only. Follow the steps in Enforce SVN Locking Model Files Before Editing. After you configure SVN to make files with certain extensions read only, then users must get a lock on these read-only files before editing.

  1. In a project, in any Files view, select the files you want to check out.

  2. Right-click the selected files and select Source Control > Get File Lock.

    Get File Lock is for SVN. This option does not modify the file in your local sandbox. Git™ does not have locks.

    A lock symbol appears in the SVN source control column. Other users cannot see the lock symbol in their sandboxes, but they cannot get a file lock or check in a change when you have the lock. To view or break locks, click Locks on the Project tab.

Note

To get a fresh local copy of the file from the repository, select Update from SVN.

In the Simulink® Editor, if an open model belongs to a project under SVN, you can get a lock by selecting File > Project > Get File Lock.

If you see an SVN message reporting a working copy locked error, remove stale locks by clicking SVN Cleanup in the Source Control section on the Project tab. SVN uses working copy locks internally and they are not the file locks you control using Get File Lock.

Manage SVN Repository Locks

To manage global SVN locks for a repository, on the Project tab, in the Source Control section, click Locks.

In the SVN Repository Locks dialog box, you can:

  • View which users have locks on files.

  • Right-click to break locks.

  • Group locks by user or file.

Related Examples

More About