Maintain and share project files with Genero Source Code Management (SCM)
A Subversion client must be installed on your local machine as described in
What is Genero Source Code Management?. In addition, you must have access
to a Subversion repository containing the OfficeStore sample to perform the steps below.
The steps in this tour assume that the files for the OfficeStore sample project have been
stored in an SVN Repository.
-
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.
Figure 1. The SCM Checkout wizard
-
Select , 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.
Figure 2. Adding a file to a project managed by SCM
-
Select , 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.
Figure 3. The SVN Status view
-
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 .
-
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.
Figure 4. Setting the needs-lock property
-
Lock and edit the account.4st file.
-
In Project Manager, right-click on the account.4st file and select .
-
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.
Figure 5. The SVN Locks view
-
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 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.
Figure 6. Performing a Diff
-
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.
Figure 7. The Blame view
-
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.
Figure 8. Reverting to a previous revision
-
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).