April 16, 2014

New in 14.1: Frozen Stream Imports

Streams & Branches

Perforce release 2014.1 enables stream 'import' paths include a changelist specifier:

import import/... //depot/import/[email protected]

Clients of this stream will use this changelist to limit their view of those files, such that revisions from later changelists will be automatically hidden from most commands. The changelist limits that are in effect for a given client are displayed in a new read-only client spec field called 'ChangeView'.

Adding a changelist specifier to the depot path of the import freezes the imported path at that point in time, at least for clients of that particular stream.  The actual depot files may have newer changes being submitted to them, but from the perspective of that stream, nothing later than the named change is visible.

This is accomplished by giving the clients of that stream a new client spec property called a "change view", which is similar to the normal client view mapping in that it defines a subset of the depot that you're interested in -- rather than defining a set of files, though, it defines a set of versions for a particular set of files.  This "view" applies to most Perforce commands that are run against that depot path -- 'p4 filelog' will only list revisions up to that changelist number, 'p4 changes <path>' won't list higher changes within that path, et cetera.  Most importantly, 'p4 sync #head' will behave like 'p4 sync @CHANGE' within that path.

Without this changelist specifier, an "import" always refers to the head revision of the imported path -- if you're trying to do your development against a known stable version, you would need to either avoid syncing that path to the head revision (e.g. sync to the stable point and then remember not to sync that path again) or create a new branch from the stable point. With the new @CHANGE option in the import path, anything you do within that stream client will treat the imported path as being locked at that stream, so you will simply never see new changes.