Jump to content

Prevent checkin with changes in wXLink and parent repo


david-fgs

Recommended Posts

Hi,

Given a situation with repo B having a writable xlink to repo A, and with pending changes including files in both A and B, is there any way to prevent committing files to both repos in the same changeset? I'd like programmers to commit changes to A in a separate changeset and am looking for a way to enforce this rule but I haven't found anything.

Thanks!

Link to comment
Share on other sites

Hello @david-fgs,

it's certainly doable using a "before-clientcheckin" trigger. You'll be provided with the paths the developer is about to checkin. You'll only need to check if changes from different repositories are mixed. In order to do check if the file is under an xlink you can use the "cm fileinfo" command like this:

cm fileinfo station\core.cs --format={IsUnderXlink}

If you find that there're changes out and inside an xlink you can cancel the operation giving a proper error message.

It's also doable with a "before-checkin" trigger, but you'll need to provide the trigger a list with the xlink paths so you can determine if the changes are inside or out of them and mixed. The trigger, for example, can read from a file keeping the xlinks root paths.

Hope it helps!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...