/* The Perforce stream specification defines a single stream. Streams are hierarchical branches with policies that control the structure and the flow of change. Stream hierarchies are based on the stability of the streams, specified by the type you assign to the stream. Development streams are least stable (most subject to change), mainline streams are somewhat stable, and release streams are highly stable. Virtual streams can be used to copy and merge between parent and child streams without storing local data. Task streams are lightweight short-lived branches that are useful for bug fixing or new features that only modify a small subset of the branch data. Stream contents are defined by the paths that you map. By default, a stream has the same structure as its parent (the stream from which it was branched), but you can override the structure, for example to ensure that specified files cannot be submitted or integrated to other streams. */ function StreamCommand(data) { Object.defineProperties(this, { /* Specifies the stream's name (permanent identifier) and its path in the stream depot, in the form `//depotname/streamname`. */ "stream": { value: data ? data.stream : undefined, enumerable: true, writable: true }, /* The date the stream specification was last modified. */ "update": { enumerable: true, get: function() { if (data && data.update) { var strVal = data.update; return Date.parse(strVal); } } }, /* The date and time that the stream specification was last accessed by any Perforce command. */ "access": { enumerable: true, get: function() { if (data && data.access) { var strVal = data.access; return Date.parse(strVal); } } }, /* The Perforce user or group who owns the stream. The default is the user who created the stream. */ "owner": { value: data ? data.owner : undefined, enumerable: true, writable: true }, /* Display name of the stream. Unlike the Stream: field, this field can be modified. Defaults to the streamname portion of the stream path. */ "name": { value: data ? data.name : undefined, enumerable: true, writable: true }, /* The parent of this stream. Must be none if the stream's `Type:` is mainline, otherwise must be set to an existing stream identifier of the form `//depotname/streamname`. */ "parent": { value: data ? data.parent : undefined, enumerable: true, writable: true }, /* The stream’s type determines the expected flow of change. Valid stream types are `mainline`, `virtual`, `development`, and `release`. - `mainline`: The mainline stream is the parent of all streams in the stream depot. Every stream depot must have at least one mainline stream. - `virtual`: Virtual streams allow merging and copying between parent and child streams without storing local data. Data is passed through to the destination (a non-virtual stream) after applying restrictions on the scope of files defined in the virtual stream’s view. Because virtual streams do not have files in their depot namespace, it is impossible to import a virtual stream. - `release`: More stable than the mainline. Release streams copy from the parent and merge to the parent. - `development`: Less stable than the mainline. Development streams expect to merge from parent streams and copy to the parent. - `task`: Task streams are lightweight short-lived branches that are useful for bug fixing or new features that only modify a small subset of the branch data. Because branched (copied) files are tracked in a set of shadow tables which are later removed, repository metadata is kept to a minimum when using this type of stream. Workspaces associated with task streams see all branched data, but only modified and promoted data is visible to users with access to the stream’s namespace. The default is stream type is development. */ "type": { value: data ? data.type : undefined, enumerable: true, writable: true }, /* Description of the stream. */ "description": { value: data ? data.description : undefined, enumerable: true, writable: true }, /* Settings that configure stream behavior as follows: - `[un]locked`: Enable/disable other users' ability to edit or delete the stream. If locked, the stream specification cannot be deleted, and only its owner can modify it. The default is unlocked. - `[all,owner]submit`: Specifies whether all users or only the owner of the stream can submit changes to the stream. The default is allsubmit. If the Owner: of a stream marked ownersubmit is a group, all users who are members of that group can submit changes to the stream. - `[no]toparent`: Specifies whether integrations from the stream to its parent are expected. The default is toparent. - `[no]fromparent`: Specifies whether integrations to the stream from its parent are expected. The default is fromparent for mainline and development streams, and nofromparent for release streams. - `mergeany,mergedown`: Specifies whether the merge flow is restricted or whether merge is permitted from any other stream. For example, the mergeany option would allow a merge from a child to a parent with no warnings. A virtual stream must have its flow options set to notoparent and nofromparent. Flow options are ignored for mainline streams. */ "options": { value: data ? data.options : undefined, enumerable: true, writable: true }, /* Paths define how files are incorporated into the stream structure. Specify paths using the following format: `path_type view_path [depot_path]` where `path_type` is a single keyword, `view_path` is a file path with no leading slashes, and the optional `depot_path` is a file path beginning with //. The default path is `share ...` Valid path types are: - `share view_path`: Specified files can be synced, submitted, and integrated to and from the parent stream. - `isolate view_path`: Specified files can be synced and submitted, but cannot be integrated to and from the parent stream. - `import view_path [depot_path]`: Specified files can be synced, but cannot be submitted or integrated to and from the parent stream. The `view_path` is mapped as in the parent stream's view, or to an (optional) `depot_path`. The `depot_path` may include a changelist specifier. That stream's client workspaces will be limited to seeing revisions at that change or lower within that depot path. For example, you can specify a depot path like this: `//depot/import/...@1000`. Revisions from changelists greater than 1000 will be automatically hidden from most commands. The changelist limits in effect for a given stream workspace are displayed in a read-only client workspace specification field called ChangeView. - `import+ view_path [depot_path]`: Functions like a standard import path, enabling you to map a path from outside the stream depot to your stream, but unlike a standard import path, you can submit changes to the files in an import+ path. - `exclude view_path`: Specified files cannot be synced, submitted or integrated to and from the parent stream. By default, streams inherit their structure from the parent stream (except mainlines, which have no parent). Paths are inherited by child stream views; a child stream’s path can downgrade the inherited view, but not upgrade it. (For example, a child stream can downgrade a shared path to an isolated path, but if the parent stream defines a path as isolated, its child cannot restore full access by specifying the path as shared.) Note that the `depot_path` is relevant only when the path_type is `import` or `import+`. */ "paths": { value: data ? data.paths : undefined, enumerable: true, writable: true }, /* Reassigns the location of workspace files. To specify the source path and its location in the workspace, use the following syntax: `view_path_1 view_path_2` where `view_path_1` and `view_path_2` are Perforce view paths (omit leading slashes and leading or embedded wildcards; terminal wildcards are fine). For example, to ensure that files are synced to the local ProjectX folder, remap as follows: `... projectX/...` Line ordering in the Remapped: field is significant: if more than one line remaps the same files, the later line takes precedence. Remappings are inherited by child streams and the workspaces associated with them. */ "remapped": { value: data ? data.remapped : undefined, enumerable: true, writable: true }, /* A list of file or directory names to be ignored in client views. For example: ``` /tmp # ignores files named "tmp" /tmp/... # ignores directories named "tmp" .tmp # ignores file names ending in .tmp ``` Lines in the `Ignored:` field can appear in any order. Ignored files and directories are inherited by child stream client views. */ "ignored": { value: data ? data.ignored : undefined, enumerable: true, writable: true } }); } module.exports = StreamCommand;
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 19553 | swellard | Move and rename clients | ||
//guest/perforce_software/helix-web-services/main/source/clients/2016.1.0/javascript/lib/models/stream_command.js | |||||
#2 | 19169 | tjuricek | JavaScript Client SDK jobs CRUD test, with supprt for "additionalProperties" in the swagger definition. | ||
#1 | 19053 | tjuricek |
Rebuild JavaScript Client SDK. The JavaScript client now is a "typed" approach that tends to be similar in approach to the other clients, based on the swagger definition for the platform version. Importantly, client SDK tests are individual scripts (that run under node) that are actually controlled via TestNG. This approach now lets us use a consistent test reporting format so we can at least collect reports from each of the jobs. The documentation is still in progress, that I want to validate as the tests are generated. |