|
- In this lesson you will learn the following concepts
- Overview
- Changing a project feature
- Modifying a project page
- Modifying the checked-out element
- Checking the checked-out element back in
- Synchronizing the project
- Offline mode
- SCM administrator
- Disconnecting from the SCM
Lesson 12.3. Handling a project in the SCM In this lesson you will learn the following concepts - Changing a project feature.
- Modifying a project page.
- Synchronizing the project.
- Offline mode.
- SCM administrator.
We will work with the SCM in real conditions by performing the following operations: - Change a project feature.
- Modify a project page.
Changing a project feature - We will apply a skin to the dialog boxes of the project:
- Open the project description: in the ribbon, on the "Project" tab, in the "Project" group, click "Description".
- Click on the "Skin" tab.
- Check "Apply the skin to the dialog boxes (YesNo and OKCancel)".
- Validate the project description window.
- Several SCM windows appear:
- First, the automatic project check-out window is displayed. To change a project feature, it must be checked out.
- The "Check in the project automatically at the end of the operation" option checks the project in once all changes have been made. Keep this option.
- Validate this window.
- WEBDEV suggests to add elements to the repository. Accept.
- The project description window is closed and the project is automatically checked back into the repository.
We will modify the "PAGE_Product_form" page. We will move the "Cancel" and "OK" buttons. To modify a project element, it must be checked out. - To modify the "PAGE_Product_form" page:
- Select "PAGE_Product_form" in the "Project explorer" pane and double-click on it to open it in the page editor.
- Automatic check-out is enabled when the first change is made: simply move a control to check out the element.
- You can also click "Check out" in the ribbon of the SCM tab (
). - The check-out window is displayed:
- The SCM shows three check-out modes:
- Exclusive (recommended mode): nobody can check out this element until it is checked back in. The element can be checked out for tests only.
- For tests: the element can be modified but the modifications will not be checked back in.
- Multiple: the element can also be checked out by other users. In this case, the differences between the different element versions can be viewed when the element is checked back in. This mode is reserved to specific cases and to experienced developers.
- Check out the page in exclusive mode. Keep the "Exclusive" option checked.
- Write a comment ("Button position updated", for example). This comment will be useful for the other developers.
- Validate the check-out.
The page is checked out.
Modifying the checked-out element A checked-out element (UI, code, etc.) can be modified as any other element of a project that is not included in the SCM. However, the other developers cannot see the changes made to the element. If other developers need to work on the checked-out element, they will use the one in the repository. This allows you to make an application evolve while keeping a stable version in the repository. - Modify the checked-out page:
- Select the "Cancel" and "OK" buttons.
- Move the buttons to the right (below the download control).
- Save the page (Ctrl + S).
Checking the checked-out element back in Now that the changes have been made, we are going to check the page back into the repository. The other developers will be able to access your changes. - On the "SCM" tab, in the "Current element" group, click "Check in". The following window appears:
This window is used to:
- view the changes made by comparing the element from the repository with the checked out element ("My changes" button).
| | |  | Note | Merging code You can compare an element with one of its earlier versions. This allows you to compare the code in order to retrieve a code section that was "lost" or accidentally deleted by another developer. |
- access the history of the element in the repository ("Properties" button).
- write a comment about the changes made. By default, WEBDEV shows the comment written when the element was checked out.
- send a message to the other developers.
- check in the changes made while keeping the element checked out ("Keep element checked out" option).
| | |  | Note | If you are using the Control Centers, the current task can be ended when the element is checked back into the Source Code Manager. This feature is useful to monitor tasks, fix bugs, etc. |
- Validate the check-in window.
Synchronizing the project Multiple options can be used to configure a project handled by the SCM. These options are grouped in the "SCM" tab of the project description (to open it, click "Description" on the "Project" tab). These options are as follows: - Propose to get the latest version of the elements when the project is opened.
When opening a project located in the SCM, this option prompts you to get the latest version of the project elements. - Suggest checking the elements back in when the project is closed.
When the project is closed, this option displays a list of the checked out elements to check some or all of them back in. By default, when the project is closed, the checked out elements are not checked back in. - Check out/Check in the project automatically.
This option allows you to automatically check out or check in the project when using an element. This option is selected by default.
The SCM allows you to work in offline mode. This mode allows a developer (who uses a laptop, for example) to continue working on a project in the repository while being offline. The principle is simple: - before disconnecting, go to the "SCM" tab, "Other actions" group, expand "Remote work" and select "Disconnect to work offline".
- on reconnection, on the "SCM" tab, in the "Other actions" group, expand "Remote work" and select "Reconnect and synchronize". Then, simply check the modified elements back in.
In offline mode, there are two options when it comes to checking out elements: - Not checking out any elements from the SCM. The other developers will be able to work on the same elements as you while you are working in offline mode. When you reconnect to the SCM, the changes you made on the element must be merged with the changes made by other developers.
- Checking out the elements in exclusive mode. No one else can use the element while you are working in offline mode.
The SCM administrator is used to directly handle the different projects included in the source code manager. It allows you to: - manage repositories (create or connect to a repository).
- manage files and directories located in a project in the repository (add, delete, rename files and directories).
- manage the different files of the repository (check-out, check-in, share, etc.).
- start some tools (options, maintenance, etc.).
- view the history of an element.
- view the status of the elements.
- perform backups.
- grant rights to the different SCM users.
- list the projects you want to dissociate from (if necessary).
- Start the SCM administrator: on the "SCM" tab, in the "Repository" group, click "Manage". All project elements are listed in the administrator.
Disconnecting from the SCM To stop using the SCM on a project: - Open the project description window: on the "Project" tab, in the "Project" group, click "Description".
- In the "SCM" tab, select "No SCM or external manager (GIT)".
- Validate the project description window.
|
|
|
|
|
|
|