- This lesson will teach you the following concepts
- Modifying a project parameter
- 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 SCM
Lesson 12.3. Using a project in SCM
This lesson will teach you the following concepts
- Modifying a project parameter.
- Modifying a project page.
- Synchronizing the project.
- Offline mode.
- SCM administrator.
Estimated time: 30 mn
We are now going to work with SCM in real conditions by performing the following operations:
- Modify a project parameter.
- Modify a project page.
Modifying a project parameter
- We are going to modify the project by asking to display the skin on the dialog boxes:
- Display the project description: in the ribbon, on the "Project" pane, in the "Project" group, click "Description".
- Click on the "Skin" tab.
- Check "Apply the skin to the dialog boxes (YesNo and OKCancel)".
- Validate the description window of project.
- Several SCM windows appear:
- First of all, the window for automatic project check-out is displayed. Indeed, we want to modify a project characteristic therefore the project must be checked out.
- The option "Automatically check the project back in at the end of operation" is used to automatically check the project back in at the end of modification. Keep this option.
- Validate this window.
- WEBDEV proposes to add elements into the repository. Accept (green button).
- The project description window is closed and the project is automatically checked back into the repository.
We are now going to modify the "PAGE_Product_form" page. We are going to move the "Cancel" and "Validate" buttons.
To modify a project element, this element must be checked out.
- To modify the "PAGE_Product_form" page:
- Select the "PAGE_Product_form" page in the project explorer and double-click the element in order to open it in the page editor.
- The automatic check-out is enabled during the first modification: all you have to do is move a control to check the element out.
- You also have the ability to click the "Check out" icon found in the ribbon of SCM pane ( ).
- The check-out window is displayed:
- The SCM proposes 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 test only.
- For test: 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.
- The page will be checked out in exclusive mode. Keep the "Exclusive" option checked.
- Type a comment ("Modifying the buttons" 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
The method for modifying a checked-out element (GUI, code, ...) is the same as the method for modifying an element in a project not managed by SCM.
However, the modifications performed on a checked-out element are not visible to the other developers.
If another developer runs the checked-out element, the element that is currently in the repository will be used.
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 "Validate" buttons.
- Move the buttons to the right (below the download control).
- Save your page (Ctrl + S).
Checking the checked-out element back in
Now that the modifications have been made, we are going to check the page back into the repository. Then, your modifications will be made accessible to the other developers.
- On the "SCM" pane, in the "Current element" group, click the "Check in" button. The following window appears:
This window is used to:
- find out the modifications performed by comparing the element found in the repository with the checked-out element ("My Modif" button).
You have the ability to compare an element to 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 found in the repository ("Properties" button).
- type a comment about the modifications performed. By default, WEBDEV proposes the comment that was typed during the check-out.
- send a message to the other developers.
- check in the modifications made to the element while keeping the element checked out ("Keep the element checked out").
|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 follow the monitoring of tasks, the corrections of bugs, ...|
Synchronizing the project
Several options can be used to configure a project handled by SCM. These options are grouped in the "SCM" tab of project description (to display it, click "Description" on the "Project" pane).
These options are as follows:
- Propose to get the latest version of the elements when the project is opened.
When opening a project found in the SCM, this option proposes to get the latest version of the project elements.
- Propose to check in the elements when the project is closed.
When the project is closed, this option is used to display the list of elements that are currently checked out in order for some of them (or all of them) to be checked back in.
By default, the checked-out elements are not checked back in when the project is closed.
- 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 is using a laptop, for example) to continue working on a project found in the repository while being disconnected.
The principle is simple:
- before the disconnection, on the "SCM" pane, in the "Other actions" group, expand "Remote work" and select "Disconnect to work offline".
- during the reconnection, on the "SCM" pane, in the "Other actions" group, expand "Remote work" and select "Reconnect and synchronize". Then, all you have to do is check the modified elements back in.
In offline mode, there are two solutions to check out elements:
- No element is checked out 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 modifications made by yourself to the element will have to be merged with the modifications made by the other developers.
- The elements that you want to modify are checked out 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 the repositories (creation, connection to a repository).
- manage the files and directories found in a project of repository (add, delete, rename, ... files and directories).
- manage the different files of the repository (check-in, check-out, share, etc.).
- start some tools (options, maintenance, etc.).
- show the history of an element.
- show the status of elements.
- perform backups.
- grant rights to the different SCM users.
- list the projects in which you are taking part in order to dissociate from them (if necessary).
- Start the SCM administrator: on the "SCM" pane, in the "Repository" group, click "Manage". All project elements are listed in the administrator.
To stop using SCM on a project:
- Display the description window of project: on the "Project" pane, in the "Project" group, click "Description".
- In the "SCM" tab, select "No developer groupware and no SCM".
- Validate the description window of project.
Click [Add] to post a comment