From db7b2c8c30e782aaadaeab42ca653f080bda94c9 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Fri, 14 Jun 2019 15:42:02 +0200 Subject: Update file locking docs - Remove outdated 'introduced in' section - Update/remove images --- doc/user/project/file_lock.md | 83 ++++++++++----------- doc/user/project/img/file_lock.png | Bin 26973 -> 46281 bytes doc/user/project/img/file_lock_folders.png | Bin 22900 -> 0 bytes doc/user/project/img/file_lock_list.png | Bin 18243 -> 0 bytes .../img/file_lock_merge_request_error_message.png | Bin 24573 -> 16254 bytes doc/user/project/img/file_lock_repository_view.png | Bin 22947 -> 17644 bytes 6 files changed, 41 insertions(+), 42 deletions(-) delete mode 100644 doc/user/project/img/file_lock_folders.png delete mode 100644 doc/user/project/img/file_lock_list.png diff --git a/doc/user/project/file_lock.md b/doc/user/project/file_lock.md index 3386eb9d0d4..5d744584243 100644 --- a/doc/user/project/file_lock.md +++ b/doc/user/project/file_lock.md @@ -1,8 +1,6 @@ # File Locking **[PREMIUM]** -> - [Introduced](https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/440) in [GitLab Premium](https://about.gitlab.com/pricing/) 8.9. -> - This feature needs to have a license with the "File Lock" option enabled. -> - If you are using Premium but you don't see the "Lock" button, ask your GitLab administrator. +> [Introduced](https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/440) in [GitLab Premium](https://about.gitlab.com/pricing/) 8.9. File Locking helps you avoid merge conflicts and better manage your binary files. Lock any file or directory, make your changes, and then unlock it so another @@ -30,12 +28,51 @@ The file locking feature is useful in situations when: Locked directories are locked recursively, which means that everything that lies under them is also locked. +## Locking a file or a directory + +NOTE: **Note:** +Locking only works for the default branch you have set in the project's settings +(usually `master`). + +To lock a file: + +1. Navigate to your project's **Repository > Files**. +1. Pick the file you want to lock. +1. Click the "Lock" button. + + ![Locking file](img/file_lock.png) + +To lock an entire directory, look for the "Lock" link next to "History". + +After you lock a file or directory, it will appear as locked in the repository +view. + +![Repository view](img/file_lock_repository_view.png) + +Once locked, any merge request to the default branch will fail +to merge until the file becomes unlocked. + +## Unlocking a file or a directory + +To unlock a file or a directory, follow the same procedure as when you locked +them. For a detailed view of every existing lock, see the next section on +"Viewing and managing existing locks". + +You can unlock a file yourself or someone else previously locked as long +as you have Maintainer and above [permissions](../permissions.md) to the project. + +## Viewing and managing existing locks + +To view or manage every existing lock, navigate to the +**Project > Repository > Locked Files** area. There, you can view all existing +locks and [remove the ones you have permission for](#permissions-on-file-locking). + ## Permissions on file locking The user that locks a file or directory **is the only one** that can edit and push their changes back to the repository where the locked objects are located. -Locks can be created by any person who has [push access](../../user/permissions.md) to the repository; i.e., +Locks can be created by any person who has [push access](../permissions.md) to the repository; i.e., Developer and higher level, and can be removed solely by their author and any user with Maintainer permissions and above. @@ -61,41 +98,3 @@ accepts a merge request, an error message will appear stating that the file is locked. ![Merge request error message](img/file_lock_merge_request_error_message.png) - -## Locking a file or a directory - ->**Note:** -Locking only works for the default branch you have set in the project's settings -(usually `master`). - -To lock a file, navigate to the repository tree under the **Repository > Files** tab, -pick the file you want to lock and hit the "Lock" button. - -![Locking file](img/file_lock.png) - ---- - -To lock an entire directory, look for the "Lock" link next to "History". - -![Locking directory](img/file_lock_folders.png) - ---- - -After you lock a file or directory, it will appear as locked in the repository -view. - -![Repository view](img/file_lock_repository_view.png) - -## Unlocking a file or a directory - -To unlock a file or a directory, follow the same procedure as when you locked -them. For a detailed view of every existing lock, see the next section on -"Viewing and managing existing locks". - -## Viewing and managing existing locks - -To view or manage every existing lock, navigate to the -**Project > Repository > Locked Files** area. There, you can view all existing -locks and [remove the ones you have permission for](#permissions-on-file-locking). - -![Locked Files](img/file_lock_list.png) diff --git a/doc/user/project/img/file_lock.png b/doc/user/project/img/file_lock.png index 33f96f20e91..82699a12ffd 100644 Binary files a/doc/user/project/img/file_lock.png and b/doc/user/project/img/file_lock.png differ diff --git a/doc/user/project/img/file_lock_folders.png b/doc/user/project/img/file_lock_folders.png deleted file mode 100644 index 5ff3d4d9dbd..00000000000 Binary files a/doc/user/project/img/file_lock_folders.png and /dev/null differ diff --git a/doc/user/project/img/file_lock_list.png b/doc/user/project/img/file_lock_list.png deleted file mode 100644 index 2c276335c83..00000000000 Binary files a/doc/user/project/img/file_lock_list.png and /dev/null differ diff --git a/doc/user/project/img/file_lock_merge_request_error_message.png b/doc/user/project/img/file_lock_merge_request_error_message.png index 65bc3692da0..4ef04b15bef 100644 Binary files a/doc/user/project/img/file_lock_merge_request_error_message.png and b/doc/user/project/img/file_lock_merge_request_error_message.png differ diff --git a/doc/user/project/img/file_lock_repository_view.png b/doc/user/project/img/file_lock_repository_view.png index 8f4ef52aacd..a2cab0decab 100644 Binary files a/doc/user/project/img/file_lock_repository_view.png and b/doc/user/project/img/file_lock_repository_view.png differ -- cgit v1.2.1