Creating Release Notes

Info & Tags

Article #:
27
Created:
03/20/07
Modified:
01/09/08

TASK

Using Perforce to create release notes


SOLUTION

In the follwing examples, assume that you made a label of your previous release called "LABEL_97.02_3549". You also know that the last change that went into "97.02/3549" was 3549. "97.02/3549" was made from the codeline: //depot/main/p4/...

For the new release, all changes have gone into the same codeline, //depot/main/p4/... and the code has been labeled, called "LABEL_97.02_3960".

Changes between two labels

If you have labels for both releases, that makes it fairly straightforward. If you don't know what codeline the label came from, you can look at the label; you need to know the depot syntax of the area of code the label was made from. First, get the list of all the changes that went into label "LABEL_97.02_3549" then get a list of all changes that went into label "LABEL_97.02_3960" then diff the two files. Note the "-i" flag says include changes that were integrated, "-l" gives the long descriptions. The file CHANGES is the list of changes that went into "97.02/3960" but were not in "97.02/3549".

	p4 changes -l -i //depot/main/p4/...@LABEL_97.02_3549 > FILE1
p4 changes -l -i //depot/main/p4/...@LABEL_97.02_3960 > FILE2
diff FILE1 FILE2 > CHANGES

Changes between two jobs

You can also check what jobs have been fixed between the two labels (or two changes) in the same way:

	p4 jobs -l -i //depot/main/p4/...@LABEL_97.02_3549 > FILE1
p4 jobs -l -i //depot/main/p4/...@LABEL_97.02_3960 > FILE2
diff FILE1 FILE2 > JOBS

Changes between two changelists

If you are trying to figure out what changes have been made and there is no label, you can use change numbers, assuming you released from a client with "up to date" files. Assume that you knew release "97.02/3549" was made after change 3549 was submitted. Assume that you knew "97.02/3960" was made after change 3960 was submitted.

	p4 changes -l -i //depot/main/p4/...@3549 > FILE1
p4 changes -l -i //depot/main/p4/...@3960 > FILE2
diff FILE1 FILE2 > CHANGES

Changes between a changelist and a label

What if you have last released off //depot/main/p4/... at change 3960, but now you are releasing your first beta release from //depot/dev/p4/... at label "LABEL_97.3_4003"? What then? Use the same mining technique; take the changes that went into the mainline at change 3960, take the changes that went into the "dev" line, and diff them.

	p4 changes -l -i //depot/main/p4/...@3960 > FILE1
p4 changes -l -i //depot/dev/p4/...@LABEL_97.3_4003 > FILE2
diff FILE1 FILE2 > CHANGES

Notes

The one problem with using labels instead of change numbers is that, with labels, you won't get information about changelists that only included file deletions. If files in one label are subsequently deleted on a changelist with only deletes, they won't be available in the client when the newer label is made, so they won't be part of the file set that gets examined. For this reason, using changelist numbers is a more robust approach. Extracting change information using change numbers will include changes that are only deletions.