3.7. Committing all Changes to a Project, Change Sets

The commands

  prjm -m -commit patch
  prjm -m -commit minor
  prjm -m -commit major
can be used to commit changes you have made during the development of your project to certain packages. As always with ComPact, a commit type of major must be used if any interface has changed that requires the recompilation of clients of the package, minor can be used, if purely internal additions and changes have taken place that do not influence any client packages, and patch is reserved for bugfixes. Thus said, it must be remarked that you usually don't issue the commit action at project level, but rather use it inside a single package.

In the rare situation that you want to create a complete new release of all packages of your project, this can be done by

  prjm -commitrelease patch
  prjm -commitrelease minor
  prjm -commitrelease major
The first line will only work if all the packages are already checked out as release. The second and third line will make prjm create new release branches for every package, using a new minor or major number, respectively, commit all local changes to these newly created branches and update the local package state to the head of the new release branches.

You will remember that release branches are used to maintain released code that is shipped to vendors and to add patches to old revisions of your product. You should use this option very carefully. It is likely that what you want to do is creating new releases for some packages and using old release branches for others. This is different from the semantics of prjm -commitrelease, which will create new release branches in for every package.

With every commit action you may create a named change set. This is initiated by simply adding the intended change set name to the command after the -cs option:

  prjm -cs feature-foo -m -commit <commit type>
This would check-in all modified packages and create a change set named feature-foo. A change set is defined as a set of packages with the state labels from before and after the change, together with an (optional) log message and a date. A named change set can be applied to other branches or states of a project. Change sets can be merged into the current workspace with the command
  prjm -mergechangeset <changeset>
Change sets live in the snapshot directory next to snapshot and release definitions. They may also be edited manually with the command
  prjm -editchangeset <changeset>
To list all available change sets use
  prjm -showchangesets
To view a complete log of all change sets use
  prjm -changesetlog


The actual creation of a change set may depend upon the execution of an external program specified by the values of the configuration variables external-project-change-set-hook or external-commit-hook. See Section 3.11 for further details.