J6/Project Manager/Snapshots
J6/Project Manager | Overview | Build | Links | Project File | Snapshots | SVN | Tabs
Snapshots can be made of the current state of a project.
These are intended as simple way of allowing comparisons between the current state of the project and an earlier state, or recovering from an earlier version.
Snapshots are not a substitute for a proper version control system. This should be done with a system like CVS or Subversion. Instead, snapshots are complementary, intended primarily for quick comparisons of work in progress, rather than keeping track of major code releases.
Parameters
The Options|Configure dialog in Project Manager lets you set the following parameters:
- Snapshots on/off
- Maximum number of snapshots to keep, default 5.
- Snapshot exclusion list, e.g. .jpg to exclude jpeg image files.
Storage
Snapshots are stored in subdirectories .snp of the project directory. Each snapshot is a copy of the project directory, stored in a subdirectory with name: sYYMMDDNNN, where YYMMDD is the date, and NNN is a number from 001 upwards.
The snapshot includes all files in the directory, except for any files specifically excluded in the configuration.
For example, here is a typical project file and snapshot directory:
d:\rim\source\table\table.ijp d:\rim\source\table\.snp\s041123001
The .snp directories are hidden, so that J directory verbs such as dirtree ignore them.
Method
Snapshots are made automatically, and can also be made manually.
Automatic snapshots are made when a project is loaded in Project Manager, as follows:
- If the snapshot directory does not exist or is empty, make a snapshot and exit.
- If there is a snapshot with today's date, then exit.
- If the current contents of the project match the most recent snapshot, then exit.
- Make a snapshot.
Manual snapshots can be made in Project Manager, by selecting menu Tools|Make Snapshot. Snapshots are made only if the current project directory differs from the most recent snapshot.
Compare
To compare snapshots, select menu Tools|Compare Snapshots. This runs Directory Match on the snapshots and current version. By default, the latest snapshot is compared with the current project.