Chapter 5. Labels and Jobs
Software configuration management is not complete without a way to save snapshots of file configurations so we can restore them later. Nor is it complete without a way to link external issues like bug reports, change requests, and to-do lists to the work we do on files. In this chapter, we’ll look at how to do these things in Perforce, including using labels and jobs.
Saving Important Configurations
There are a number of ways to mark and restore file configurations in Perforce:
You can use changelist numbers. Every changelist number is a snapshot of the depot.
You can use dates and timestamps. Perforce knows the state of the depot at any point in time.
You can use labels. Labels can be applied to depot snapshots and to workspace-synchronized revisions as well as to arbitrary collections of files at mix-and-match revisions. And because labels can have descriptive names, they are easier to recognize than changelist numbers.
You can use jobs. Jobs can be linked to changelist numbers, giving you a way to mark the depot snapshots that are important to you. Like labels, jobs can have descriptive names.
Each of these methods has its pros and cons, as you’ll learn from reading this chapter.
Changelists and dates: the automatic snapshots
Every time a user submits files to Perforce, a snapshot of the depot is created automatically. The changelist number created at submit time is effectively a global revision number. It can be use to reference any file or set of files ...
Get Practical Perforce now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.