gbCodeLib - Revision Control|
To enable revision control simply check the Options > Repository > Enabled
menu option. Then, each time a snippet is changed (and saved), the revised snippet will
automatically be added to a separate repository file. No additional user action is required.
To view all previous revisions of a snippet simply right-mouse click on a snippet in the
Tree view and select the Show Repository menu option. The following window will be displayed:
Repository Window Features
The selected snippet is shown in the left side of the Repository window.
Available snippet revisions are listed in the list box at the right of
To select a snippet revision just click on the revision number in the listbox.
The selected revision will be displayed in the center textbox.
Once a Repository revision of a snippet is selected, the Transfer button can be used
to replace the source code and title (optional) information in the main gbCodeLib window.
The Transfer button also closes the Repository window.
Normally the Repository window simply displays the selected gbCodeLib snippet and the
selected revision from the Repository. By selecting the Show Comparison checkbox the
display will perform a side-by-side comparison of the snippets. Lines which are not
identical between the two snippets are shaded. Use the Scroll Lock option to have
both snippet textboxes to scroll synchronously.
The difference comparison works against complete lines of text. Individual character
differences between two lines are not highlighted.
Unselect the Show Comparison checkbox to return to the normal view of the snippets.
Revision Control Setup
When revision control is first enabled a complete copy of the snippet database
is made, with each snippet assigned a revision level of '000'. The copy resides
in a separate repository file.
From then on when a snippet is changed (and saved), the revised snippet is added to
the repository file and automatically assigned the next numerical revision.
The original snippet database will contain only the most recent revision of all snippets,
whereas the respository will contain a copy of all revisions.
Under normal operation gbCodeLib assigns each snippet a unique ID. When a snippet is
changed it continues to carry the assigned ID number, plus the incremental revision.