Explore Source Code Management
Maintain and share project files with Genero Source Code Management (SCM)
Before you begin, a Subversion client must be installed on your local machine as described
in Subversion plugin overview. In addition, you must
have access to a Subversion repository containing the OfficeStore sample to perform the steps
below.
-
Use the Checkout option from the SCM menu to checkout the OfficeStore
project files from the repository to your checkout directory.
The SCM Checkout wizard steps you through the process of checking out project files and prompts you to select a project file (4pw) to open in Project Manager.
-
Select File > New > Genero Files > Style (.4st), and save the new styles file as account.4st in the Entities
node.
Adding a file to the project automatically performs an SVN add, which uploads and adds the file to the repository on your next SVN commit. The Entities folder displays a red exclamation mark to indicate uncommitted changes to the directory.
-
Select Window > Views > SVN Status, navigate to your checkout directory and select Add
mode.
Selecting Add mode lists the newly added styles file as well as any other unversioned files present in the directory.
- Ensure the Select option is checked and select the Commit... button at the top of the view to invoke the SVN Commit dialog.
- Enter New styles file in the Commit Comments area and select the Commit button to commit the new file to the repository.
-
Enable the SVN needs-lock property on the account.4st file to prevent commit conflicts.
Setting the needs-lock property requires a user to lock the file before modifying it.
- Right-click on the account.4st file in the Projects view and select SCM > Properties.
- Select the + at the top of the Property view to launch the Add SVN Property dialog.
- Select svn:needs-lock from the selection list, select OK and close the SVN Properties dialog.
-
Lock and edit the account.4st file.
- In Project Manager, right-click on the account.4st file and select SCM > lock.
- Enter testing locks in the Lock files comment area and select Lock.
- Select the SVN Locks button in the SVN view at the bottom of the screen to view information about all locked files in the checkout directory.
-
Open the account.4st file in Code Editor, delete lines two through nine
and save the changes.
Deleting the lines will create many errors as indicated by the red icons in the Code Editor gutter.
-
Select the account.4st file in the SVN Status view and commit the changes
(use style edits for the Commit Comment).
Note that committing the file releases the lock. You may be prompted to reload the modified file when you commit. Respond by selecting Reload.
- Right-click the account.4st file in the Project view and select SCM > Show Log to add and open the SVN Log view at the bottom of the screen.
-
Right-click on the entry for Revision 4 in the SVN Log and select Diff
to call the Diff utility to compare the selected revision with the previous revision.
You can also use ctrl-click to select specific revisions you wish to compare with the Diff utility.
-
Right-click on the entry for Revision 4 in the SVN Log view and select
Blame to see inline annotations for each change, including the author and
revision number.
-
Revert back to an error-free version of the account.4st file.
- Right-click on the entry for Revision 3 and select Revert to this Revision... to launch the SVN Merge/Revert dialog.
-
Accept the defaults in the SVN Merge/Revert dialog and select
Merge/Revert, then Finish in the Merge/Revert result
window.
The account.4st file reverts back to the selected revision and displays in Code Editor with the deleted lines from Revision 4 replaced and highlighted.
-
Delete the account.4st file to complete the tour.
- Close the account.4st file in the Code Editor view.
- Right-click the account.4st file in Project Manager and select Delete from Disk.
- Select the account.4st file in the SVN Status view and select Commit... (enter SVN test for the Commit Comment).