Adding baselines and checkpoints with the .scan command

You can use the .scan command to add more information to the BOM. When the .scan command is run, the system stores information about the state of the files in the step's working directory. This section shows an example of how to use it. See also the reference information for .scan.

The command has two forms.

.scan baseline
Stores a list of all files in the step's working directory tree, with MD5 values for each. The system displays the list in the BOM for the job. You might want to issue this command after performing some setup steps and checking out an appropriate set of files. You can have multiple baseline commands in a project, but each one resets the list to the state of the step's working directory when the .baseline command runs.
.scan checkpoint
Stores a list of all new, changed, and deleted files since the last .scan baseline or .scan checkpoint in the project, with MD5 values for each file. As with the .scan baseline command, the system displays the list in the BOM. You must issue a .scan baseline command before the first .scan checkpoint command in your project. A .scan checkpoint command that precedes a .scan baseline command is ignored.

The following example shows how .scan baseline and checkpoint commands work together:

Number

Step

Files after step

BOM data

1

Check out initial files

config.c
execute.c
 

2

.scan baseline

config.c
execute.c

Baseline:

config.c
execute.c

3

Add data file

config.c
execute.c
data.txt
 

4

.scan checkpoint

config.c
execute.c
data.txt

Checkpoint 1:

Added data.txt

5

Add more data files

config.c
execute.c
data.txt
data2.txt
data3.txt
 

6

Delete data.txt

config.c
execute.c
data2.txt
data3.txt
 

7

.scan checkpoint

config.c
execute.c
data2.txt
data3.txt

Checkpoint 2:

Added data2.txt, data3.txt

Deleted data.txt


Feedback