Jump to content

Permissions to enforce integration rules


diegohb

Recommended Posts

How could I enforce permissions to only allow merge from (any) label in one particular branch (by name)... for example, given branches main and production, I'd like the only allowed checkins into production branch to be from a label in main branch (or also from a previous cs (subtractive merge) in the production branch).

Is this possible?

Link to comment
Share on other sites

Hi,

This is possible by using a "before-checkin" trigger. To achieve that is possible that you need to check the "plastic.merges" file. This file is created in the workspace client folder, under the ".plastic" hidden folder. And contains the information of the pending merge links.

The last field on this file is the origin changeset (so later, with the "cm find" command you can check if it is a labeled changeset on main) and the field before the last is the type of merge ("Merge", "CherryPickSubtractive", etc.). Be aware that if more than one merge have been applied, they will be listed in a row, separated by a comma (,).

You can check the trigger guide for more help:

http://www.plasticscm.com/releases/4.1/manuals-html/en/adminguide.htm#_Toc324420290

If you have further questions, just ask. :)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...