Scenarios¶
This section will cover various sitiations and how to handle them with HCM. Each scenario is assuming the repository structure shown below:
- The repository represent a product line
- The components directory is at the base of the repository
- This is where components between products will be shared
- There are two projects under the trunk directory
- Under each project is a components directory
- This is where components will be developed
Scenario 2: Project needs to make an update but does not want to use a newer version¶
Setup¶
In this scenario Project A (PA) is getting ready to release code to production. PA is at version 1.0.0 of the rook component. PA has to make some minor changes to the rook component. PA checks for any updates to the rook component and finds a version 1.1.0. Due to the phase of the program, PA does not want to bring in the changes for version 1.1.0.
Goals¶
- Show how Project A can still make local changes
- Show how Project A can publish without affecting 1.1.0
Workflow¶
The following diagram shows the steps in this scenario:
- Project A checks for updates to the rook component
- Project A makes and commits changes locally
- Project A publishes version 1.0.1 of the updated rook component to the component directory.
These are the commands
Task | Project A |
PA looks for updates | hcm list hcm show rook –upgrades |
PA makes changes | vim rook/rtl/rook.vhd svn ci rook -m “Added header.” |
PA Publishes rook | hcm publish rook 1.0.1 -f release_notes.txt |
Scenario 3: Project needs to make an update but sees an upgraded version¶
Setup¶
In this scenario Project A (PA) wants to make a change to a component. PA is at version 1.0.0 of the rook component. PA has to make some changes to the rook component. PA checks for any updates to the rook component and finds a version 1.0.1. PA wants to include changes from 1.0.1.
Goals¶
- Show how Project A can make changes to an upgraded version of a component
- Show how Project A can make changes available to other projects
Workflow¶
The following diagram shows the steps in this scenario:
- Project A checks for updates to the rook component
- Project A installs version 1.0.1
- Project A makes and commits changes locally
- Project A publishes version 1.1.0 of the updated rook component to the component directory.
- Project A installs published version
These are the commands
Task | Project A |
PA looks for updates | hcm list hcm show rook –upgrades |
PA installs rook | hcm install rook svn ci rook -m “Installing rook version 1.0.1” |
PA makes changes | vim rook/rtl/rook.vhd svn ci rook -m “Fixing bug with movement.” |
PA Publishes rook | hcm publish rook 1.1.0 -f release_notes.txt |
Scenario 4: Bringing in a component from a long lived branch¶
Setup¶
In this scenario Project A (PA) has a component it has modified on it’s own branch.
- The component is not under HCM control.
- There is a similar component that is under HCM control.
- The published version of the component is 1.1.0
- PA wants to merge their changes with what is published.
Goals¶
- Show how Project A can merge their changes with the published version.
- Show how Project A can make changes available to other projects
- Show how Project A can start to use HCM to control the component
Workflow¶
The following diagram shows the steps in this scenario:
- Project A checks the repository for the component
- Project A copies the existing component directory to a backup
- Project A installs the latest version of the component
- Project A compares the contents of the backup and installed version
- Project A merges the changes from the backup to the installed version manually
- Project A commits changes locally
- Project A publishes version 1.2.0 of the updated component to the component directory.
These are the commands
Task | Project A |
PA checks repository | Use a repo browser or a web browser to check what version of the component is installed. |
PA makes backup component | cp -r rook rook_backup |
PA installs component | hcm install rook svn ci rook -m “Installing version 1.1.0 of rook” |
PA compares backup to installed component | Using a tool specifically made for comparing directories will help. |
PA merges backup and installed component | Move, add, modify, and/or delete files as necessary to change the installed version to the version you want to publish. |
PA commits merged component | svn ci rook -m “Merged rook with version 1.1.0 of “rook” |
PA publishes merged component | hcm publish rook 1.2.0 -f release_notes.txt |