1. Changelist Definition and Role in CCR
Key Points
- Changelist is the Perforce term for an atomic set of changes submitted in a single transaction
- All changelists have a unique numerical ID assigned by Perforce
- CCR submits all items in an ItemSet as one changelist tagged with the CCR ID
- The CCR does not submit the ItemSet itself to Perforce; it submits the individual items contained within the ItemSet
- The `authorizeAndStartMoveToTEST` action integrates all changelists tagged with a CCR ID from the BASE branch to the TEST branch
- Integration is submitted as one changelist tagged with the CCR ID
Detailed Notes
A changelist is the fundamental unit of change tracking in Perforce. It represents an atomic set of file modifications that are committed to the Perforce server in a single transaction. Every changelist receives a unique numerical identifier that serves as a permanent reference for that set of changes.
In the context of CCR, changelists serve as the bridge between the CCR workflow and the Perforce source control system. When a user creates an ItemSet and it is committed to Perforce, CCR packages all items from that ItemSet into a single changelist. This changelist is tagged with the CCR ID, establishing a clear link between the Perforce history and the CCR record.
It is important to understand that CCR does not submit the ItemSet file itself to Perforce. The ItemSet is a CCR-specific packaging mechanism. What gets submitted to Perforce are the individual items (class files, routines, web files, etc.) contained within that ItemSet. The changelist groups these items together as an atomic unit.
When a CCR is progressed from BASE to TEST using the authorizeAndStartMoveToTEST transition, Perforce integrates all changelists tagged with that CCR ID from the BASE branch to the TEST branch. The integration itself is submitted as a new changelist, also tagged with the CCR ID, creating a clear audit trail of how changes move between environments.
Source control, of which Perforce is one example used as the InterSystems standard, serves as a database for flat file items. It provides central storage for code, full versioning capabilities, prevents permanent deletion, and maintains all history. Source control answers the fundamental questions about every change: Who made it, What was changed, When it was changed, Where it was changed, Why it was changed, and How. It is also known as SCM (Source Control/Code Management). Perforce Helix was chosen by InterSystems for its speed, powerful visual client (P4V), excellent branching and merge capability, and low administrative effort. Perforce uses a client-server model with a single server hosted at Cambridge HQ (perforce.iscinternal.com:1666) for all CCR deployments, with a replica server in Sydney for local work.
---
Documentation References
2. Locating and Identifying Submitted Change Metadata
Key Points
- The Perforce Details section of every CCR record contains transport information and actions
- Key information displayed includes: Perforce login status, Access Token, Transport Log, ItemSets, and Submitted Changes
- Click the Submitted Changes tab to view all changelists in Perforce associated with the CCR
- Each changelist shows: changelist number, check-in user, timestamp, and description
- File-level detail shows the action taken on each file (add, edit, delete, branch, integrate, undo) and the file revision number
- Three action icons per file: View (shows full contents at that revision), History (color-coded revision list), and Diff (shows diff chunks changed at that revision)
- Changelist numbers link to Swarm (for InterSystems employees only)
- No ItemSet information is displayed in Submitted Changes because ItemSets are effectively disposable once used for transport
Detailed Notes
The Perforce Details section is a dedicated area within every CCR record that provides comprehensive information about the CCR's interaction with Perforce. This section serves as the primary interface for viewing transport-related information and performing Perforce actions.
The Perforce Details section displays several key pieces of information at the top level: the Perforce Branch path (showing which depot path the CCR targets), the Perforce Job identifier, the Access Token for API access, and links to View or Download the Transport Log.
Below these fields, a tabbed interface provides access to: Itemset Details, Submitted Changes, Create Itemset, Perforce Integration, and Perforce Backout.
The Submitted Changes tab is particularly important for auditing and troubleshooting. When clicked, it displays all changelists that have been committed to Perforce and associated with this CCR. Each changelist entry shows the changelist number (which links to Swarm for InterSystems employees), the user who performed the check-in, the timestamp of the submission, and a description that typically references the ItemSet name and creation details.
Expanding a changelist reveals the individual files affected. Each file line shows three action icons (View, History, Diff), the action taken on the file (such as add, edit, delete, branch, integrate, or undo), and the full depot path with revision number. The View icon displays the entire contents of the item at that specific revision and provides links to diff against any other revision. The History icon shows a color-coded list of all revisions to that item. The Diff icon shows the specific diff chunks that changed at that revision.
Notably, the Submitted Changes tab shows no information about ItemSets because ItemSets are a CCR transport mechanism that is effectively disposable once the items have been successfully committed to Perforce.
Errors related to Perforce or ItemSets also appear in the Perforce Details section. Orange or red messages in Perforce Details should never be ignored. While CCR may allow progression of a change despite error messages, this does not mean the CCR should be progressed. This flexibility exists for rare situations, but ignoring errors without fully understanding and resolving them has caused crises in production environments.
---
Documentation References
3. Logging into Perforce in CCR
Key Points
- All CCR users who need CCR to perform Perforce actions on their behalf must have a Perforce username and password
- This applies to both InterSystems and non-InterSystems users
- CCR assumes the same username in Perforce as the CCR username
- CCR attempts to use the same password for Perforce on logging into CCR
- If Perforce and CCR passwords differ, the user must supply the Perforce password separately to CCR
- The Perforce Details section of every CCR shows the current login status (e.g., "logged into Perforce as username" or a "log into Perforce" link)
- New CCR users may see "user is not a Perforce user" message; CCR regularly queries Perforce to synchronize user lists
- InterSystems employees can force resynchronization via Menu > Refresh Perforce Users
Detailed Notes
Authentication with Perforce through the CCR interface is essential for performing transport-related actions. The system is designed to streamline this process by leveraging the existing CCR credentials wherever possible.
When a user logs into CCR, the system automatically attempts to authenticate with Perforce using the same username and the same password. This means that if a user's Perforce credentials match their CCR credentials, Perforce login happens transparently without any additional action required.
However, if the Perforce password differs from the CCR password, the user must explicitly provide their Perforce password to CCR. This is done through the Perforce Login dialog, which can be accessed by clicking the "log into Perforce" link displayed in the Perforce Details section of any CCR record.
The Perforce Details section always displays the current Perforce authentication status in the upper-right corner. When authenticated, it shows "logged into Perforce as [username]". When not authenticated, it displays a clickable "log into Perforce" link alongside the username. Clicking this link opens a dialog where the user enters their Perforce password to complete authentication.
New CCR users may encounter the "user is not a Perforce user" error message. This occurs because CCR maintains a cached list of Perforce users and periodically queries the Perforce server to refresh this list. If a user's Perforce account was recently created, it may not yet be reflected in CCR's cache. InterSystems employees can force an immediate resynchronization by navigating to Menu > Refresh Perforce Users.
It is important to note that not all CCR actions require Perforce authentication. Creating and deploying ItemSets to environments does not require a Perforce account. However, certain actions do require being logged into Perforce: clicking the startMoveToXXXX transition on Tier 1 or Tier 2 CCRs, manually triggering integration or backout through the Perforce Details section, and performing integration previews. Users without a Perforce account are blocked from these actions entirely, while users with an account who are not yet logged in will see the "Log into Perforce" field flash and turn yellow as a prompt.
---
Documentation References
4. Diff Chunks and Merge Conflicts
Key Points
- A diff chunk is a section of a file that differs from its previous revision, representing an insert, update, or delete
- Perforce identifies and records diff chunks automatically when changes are submitted
- Diff chunks enable independently moving changes from different CCRs that edit different sections of the same item
- Integrations only move the diff chunks associated with a specific CCR record, not the entire file
- Exception: the entire file is copied if it does not yet exist in the target branch
- Integration succeeds when the base for each diff chunk in the source item exists in the target item
- A merge conflict occurs when the base for any diff chunk in the source item does not exist in the target environment
- Non-overlapping changes to the same file from different CCRs do NOT cause merge conflicts and can be progressed independently
Detailed Notes
Diff chunks are the mechanism by which Perforce tracks granular changes within files. When a file is edited and submitted, Perforce compares the new version against the previous revision and identifies the specific sections that differ. Each such section is called a diff chunk and represents either an insertion of new content, an update to existing content, or a deletion of content.
This granular tracking is fundamental to how CCR transport works. When changes need to move between Perforce branches (for example, from BASE to TEST), the integration process does not copy entire files. Instead, it moves only the diff chunks associated with the specific CCR record being progressed. This is a critical design feature because it allows multiple CCRs to make changes to the same file and progress independently, as long as their changes affect different sections of the file.
For integration to succeed, the base content for each diff chunk in the source branch must exist in the corresponding location in the target branch. The "base" is the original content that the diff chunk modifies. If Perforce can find this base content in the target item, it can apply the diff chunk cleanly.
A merge conflict occurs when Perforce cannot find the expected base content in the target environment. This typically happens when another CCR has already modified the same section of the file in the target branch, changing the base content that the current integration expects to find. When a merge conflict is detected, the integration fails with a merge conflict error and must be resolved before the CCR can progress.
An important nuance illustrated in the course material: if CCR #1 makes a change to one section of a file and CCR #2 makes a change to a completely different section of the same file, CCR #2 can successfully progress to TEST even if CCR #1 has not yet been progressed. This is because the diff chunks do not overlap, so the base content for CCR #2's changes still exists in the target branch regardless of whether CCR #1 has been integrated.
---
Documentation References
5. Finding and Identifying ItemSets Associated with CCR
Key Points
- ItemSets are found in the Itemset Details tab of the Perforce Details section in each CCR record
- Two categories: ItemSets for server (submitted to CCR from the BASE environment, hidden if successfully committed to Perforce) and ItemSets for client (generated by CCR to deploy to environments, hidden if successfully deployed)
- ItemSets contain metadata and complete copies of each item (not just diff chunks)
- ItemSet statuses for client: Undeployed (gray), Deployed (green checkmark), Error (red warning), Downloaded (blue checkmark -- sent to filesystem but not loaded into namespace)
- ItemSets expire after 24 hours to prevent deploying outdated versions of items
- The Refresh Itemset button generates a new ItemSet based on the latest version of items
- A Show All toggle reveals hidden (successfully completed) ItemSets
- ItemSets are listed per environment: TEST, LIVE, and Server Itemsets
Detailed Notes
ItemSets are the packaging mechanism CCR uses to transport items between the Perforce server and client environments. They are found within the Perforce Details section of each CCR record, under the Itemset Details tab.
The CCR record distinguishes between two types of ItemSets. ItemSets for server are those submitted to CCR from the BASE environment -- they contain items that need to be committed to Perforce. Once successfully committed, these ItemSets are hidden by default. ItemSets for client are generated by CCR for deployment to target environments (such as TEST or LIVE). Once successfully deployed to all required environments, these are also hidden by default. A Show All toggle allows viewing of hidden ItemSets for audit purposes.
A common misconception is that ItemSets contain only diff chunks. In fact, ItemSets contain metadata plus complete copies of each item. The diff chunks associated with a CCR are integrated to a target branch and merged to create new revisions of items. The ItemSets then contain all of the new revisions (complete files) of the items for that CCR. This is important because it means ItemSets are self-contained deployment packages.
ItemSets for client have four possible statuses: Undeployed (not yet attempted), Deployed (successfully deployed, no further action required), Error (an issue must be fixed before progressing the CCR), and Downloaded (the ItemSet has been sent to the environment's filesystem but has not yet been loaded into the namespace).
ItemSets have a 24-hour expiration window to help prevent deploying outdated versions of items. If an ItemSet has expired, the Refresh Itemset button becomes available, allowing the user to generate a new ItemSet based on the latest version of items in Perforce.
When a user without a Perforce account uploads an ItemSet from a client environment to CCR, the ItemSet is queued on the CCR server. The entire queue for an organization is committed to Perforce when any user who is logged into Perforce uploads an ItemSet, or when any logged-in user clicks the "commit queue" link next to an uncommitted ItemSet. When the queue is committed, all resulting changelists reference the user who caused the queue to clear, not necessarily the user who originally created the ItemSet.
---
Documentation References
6. Source Workspace Description
Key Points
- The source workspace is a file-based replicate of the Perforce branch on the local environment
- Branch path structure: `//custom_ccrs/
/ / / /` where Cc = Country code, Site = Site code, Sys = System code, Env = BASE/TEST/UAT/LIVE - Source workspace on the environment mirrors the same structure: `\source\custom_ccrs\
\ \ \ \` - Items are automatically exported to appropriate subfolders by type: cls/ (classes), cspapp/ (web files), inc/ (includes), prj/ (projects), rtn/ (routines), rul/ (rules), lut/ (lookup tables), schema/hl7/ (HLv2 schemas), ds/ (BI dashboards)
- Read/Write file settings are part of concurrency control: Read-only = not checked out; Read/Write = checked out
- Never manually change file read/write settings through file system controls
- Special subdirectories: `/internal` is never integrated to LIVE (for unit tests, sample data); `/backup` is never integrated (for System Default Settings)
- For TEST and LIVE, the workspace should always exactly match its branch; for BASE, it should match except for items actively being edited
Detailed Notes
The source workspace is a fundamental concept in CCR Transport. It is a file-based replicate of the Perforce branch for a given environment, residing on the local file system of that environment's server. The source workspace mirrors the structure and content of the corresponding Perforce branch, containing the head revisions of all items.
The Perforce branch path follows a hierarchical naming convention: //custom_ccrs/<Cc>/<Site>/<Sys>/<Env>/, where custom_ccrs is the top-level depot for CCR applications, <Cc> is the country code, <Site> is the site code, <Sys> is the system code, and <Env> is the environment (BASE, TEST, UAT, or LIVE). For example, the CCR application's own BASE branch is //custom_ccrs/us/ISCX/CCR/BASE/. The corresponding source workspace on the environment follows the same structure: \source\custom_ccrs\us\ISCX\CCR\BASE\.
Within each branch, items are automatically organized into subfolders based on their type. Standard subfolders include cls/ for class files, cspapp/ for web files (JavaScript, CSP, CSS), inc/ for include files, prj/ for project files, rtn/ for routines, rul/ for Interoperability Message Rules, lut/ for Interoperability Lookup Tables, schema/hl7/ for HLv2 Custom Schemas, and ds/ for Business Intelligence dashboard definitions. Additional custom subfolders (such as /java) can be created as needed, with custom ImplementCCR routines or CCR Event Handlers providing automation support.
The read/write status of files in the source workspace is a critical part of Perforce's concurrency control framework. Read-only files indicate they are not currently checked out, while read/write files indicate active checkout. Users must never manually change file permissions through operating system file controls, as this bypasses Perforce's tracking and can lead to synchronization problems.
Two special subdirectories have specific integration rules: the /internal subdirectory is never integrated to LIVE and is intended for unit test files and sample data, while the /backup subdirectory is never integrated to any target branch and is used for items like System Default Settings.
For TEST and LIVE environments, the local source workspace should always exactly match the corresponding Perforce branch. For the BASE environment, the workspace should match the BASE branch except for items that are actively being edited (checked out). This consistency between the source workspace and Perforce branches is what enables reliable ItemSet deployment and ensures that the code running in each environment matches what Perforce records as the current state.
---
Documentation References
7. Baselining Definition and Importance
Key Points
- Baselining synchronizes Perforce and environments by establishing a known starting point
- An InterSystems employee is usually involved in the baselining process
- Tier 1 baselines sometimes require direct Perforce access; Tier 2 baselines always require direct Perforce access
- Baselining establishes the starting point in Perforce for all future change tracking
- Without baselining, editing an item that was never added to Perforce means: cannot diff the change (no previous revision exists), and cannot backout (would delete the entire item)
- Baselining establishes a clean integration history, preventing inconsistencies between environments
- Bad practices (such as skipping baselining) lead to diff chunks that are inconsistent between environments, causing cascading merge conflicts
Detailed Notes
Baselining is the process of synchronizing the content of Perforce branches with the actual state of the environments they represent. It establishes a known, consistent starting point from which all future changes can be tracked, compared, and integrated.
The importance of baselining cannot be overstated. Without a proper baseline, Perforce has no reference point for any items that existed in the environment before CCR was introduced. If a user edits an item that was never baselined (never added to Perforce), several critical problems arise. First, it becomes impossible to diff the change because Perforce does not have a previous revision to compare against. Second, it becomes impossible to perform a proper backout because backing out would effectively delete the entire item rather than reverting it to a known previous state.
Baselining also establishes a clean integration history across all branches. When environments are properly baselined, each branch starts with a consistent set of items, and all subsequent changes are tracked as diff chunks relative to these baselines. Without this clean starting point, diff chunks become inconsistent between environments, leading to merge conflicts that are difficult or impossible to resolve cleanly.
The baselining process typically requires the involvement of an InterSystems employee due to its technical complexity and the need for direct Perforce access. For Tier 1 environments (which are directly connected to Perforce), baselining sometimes requires direct Perforce access. For Tier 2 environments (which connect to Perforce through the CCR online server), baselining always requires direct Perforce access.
Proper baselining is a prerequisite for reliable CCR transport operations. Organizations that skip or incompletely perform baselining will encounter increasing difficulties as changes accumulate, because the inconsistencies between Perforce's understanding of the code and the actual state of the environments will compound over time.
---
Documentation References
Exam Preparation Summary
Critical Concepts to Master:
- Changelist definition: A changelist is the Perforce term for an atomic set of changes in a single transaction, identified by a unique numerical ID, and tagged with the CCR ID when submitted through CCR
- Submitted Changes metadata: The Submitted Changes tab in Perforce Details shows changelist number, user, timestamp, description, file actions (add/edit/delete/branch/integrate/undo), and file revision numbers; three icons per file provide View, History, and Diff capabilities
- Perforce login in CCR: CCR assumes the same username and attempts the same password; if passwords differ, the user must explicitly provide the Perforce password; the Perforce Details section always shows current login status
- Diff chunks vs merge conflicts: Diff chunks are sections of a file that differ from the previous revision; merge conflicts occur when the base for a diff chunk does not exist in the target branch; non-overlapping changes do NOT cause conflicts
- ItemSet contents: ItemSets contain metadata plus complete copies of each item (not just diff chunks); they are categorized as server or client ItemSets, expire after 24 hours, and have four possible statuses (Undeployed, Deployed, Error, Downloaded)
- Source workspace: A file-based replicate of the Perforce branch on the environment, organized into subfolders by item type; read-only means not checked out, read/write means checked out; never manually change file permissions
- Baselining importance: Synchronizes Perforce and environments; without it, you cannot diff changes or perform backouts; establishes clean integration history and prevents cascading merge conflicts across environments
Common Exam Scenarios:
- Identifying what a changelist represents in Perforce terminology (atomic set of changes in one transaction)
- Locating specific metadata for a submitted change (Submitted Changes tab shows changelist number, user, timestamp, description, file actions, and revision numbers)
- Determining what action to take when Perforce login fails in CCR (supply Perforce password separately if it differs from CCR password)
- Identifying which CCR actions require a Perforce account (startMoveToXXXX transitions, manual integration/backout, integration previews) versus those that do not (creating and deploying ItemSets)
- Predicting whether a merge conflict will occur based on overlapping vs. non-overlapping diff chunks
- Distinguishing ItemSet contents from diff chunks (ItemSets contain complete files, not just diff chunks)
- Identifying which information is never shown in the Perforce Details section (there is no link to directly edit an item)
- Selecting the correct description of the source workspace (file-based replicate of the Perforce branch with head revisions)
- Explaining why baselining is required before making changes through CCR (establishes starting point for diffs, backouts, and clean integration history)
- Understanding the consequences of editing an item that was never baselined (cannot diff, cannot backout without deleting entire item)
Hands-On Practice Recommendations:
- Navigate to the Perforce Details section of a CCR and explore each tab (Itemset Details, Submitted Changes, Create Itemset, Perforce Integration, Perforce Backout)
- Review submitted changelists and use the View, History, and Diff icons to inspect individual file changes
- Practice the Perforce login flow through the CCR interface, including the scenario where passwords differ
- Examine ItemSet statuses across different environments (TEST, LIVE, Server Itemsets) and use the Show All toggle
- Review the source workspace file structure on a connected environment and observe the subfolder organization by item type
- Create a scenario where two CCRs modify different sections of the same item and verify that both can integrate independently without merge conflicts
- Examine the Perforce branch path for a CCR and trace it to the corresponding source workspace directory on the environment
- Verify that baseline items have proper revision history in Perforce by using the History icon in the Submitted Changes tab