Skip to main content
15-Moonstone
May 9, 2014
Solved

Source Project Checkpoint only if no deltas - with trigger?

  • May 9, 2014
  • 1 reply
  • 3557 views

Hi,

we would like to do a project checkpoint, but only if there are no member deltas - like for the sandbox snapshot.

I thought this could be done with a trigger.

A server side trigger however does not seem to have access to the sandbox data and so cannot be used.

A client side trigger seems to be much less flexible and powerful.

In addition, I really do not know if there is a checkpoint project client trigger event that can be used.

Does anybody have experience with project checkpoints only if there are no member deltas?

    Best answer by mrump

    As far as I know, unfortunately there is no such thing as a client side pre-trigger event at all.

    There is a checkpoint pre- event trigger on the server, but that won't fit your needs.

    1 reply

    ssaul15-MoonstoneAuthor
    15-Moonstone
    May 9, 2014

    ...what makes things even more complicated:

    We would like to allow certain files to have deltas if they have a special attribute set.

    16-Pearl
    May 9, 2014

    Hi Stephan,

    The "member delta" in the Sandbox view indicates that a checkin on the working revision would lead to a branch.

    This can have 2 different reasons:

    1. your Sandbox is out of sync

    2. your project is out of sync, meaning, the current member revision is is not the TIP revision

    The "member delta" in the project view indicates the same but there is only one reason:

    - your project is out of sync, meaning, the current member revision is is not the TIP revision

    A checkpoint operation is always a server-side project operation. The checkpoint gives a sh## on any sandbox's content. It simply stores the current project's list of members (and their revision) and sub-projects recursively.

    Knowing all this, what exactly is you usecase?

    If you want to avoid checkpoints on project configurations that are not "latest and greatest": you can write a sever-side trigger catching the checkpoint PRE-event, that checks the project's content for any member that has a newer revision available, and abort the checkpoint operation if it finds one.

    Of course you can extend this trigger for a check on certain member attributes.

    But to be honest I do not see a real-live benefit in such a trigger, as it undermines basic functionality of a SCM system.

    HTH Matthias

    ssaul15-MoonstoneAuthor
    15-Moonstone
    May 9, 2014

    Hi Matthias,

    thanks for your detailed explanation.

    Our usecase is that a user has built software from his local sandbox, tested it and now wants to checkpoint it.

    A project checkpoint only freezes the member versions, independent on the sandbox content.

    A sandbox snapshot freezes the sandbox working files, but only if there are no deltas (otherwise it aborts).

    Our user has several local member deltas - for example, generated hexfiles that are also versioned, but also many other files. They have a local delta, no member delta and so this delta is not known to the server.

    Project out of sync, meaning, the current member revision is is not the TIP revision is not relevant in this case.

    A checkpoint of this project won't reflect the tested version.

    A snapshot won't be possible since there are deltas.

    I know that it would be much more convenient to tell the user "check in ALL of your files before checkpointing", but with human factor, this will not always be done.

    So we had the idea of forcing the user to checkin all relevant files (this is where the attributes come from) before doing a checkpoint.

    So we would like to do an extended sandbox snapshot that allows some deltas, but not on relevant files.

    Or to do a more restrictive checkpoint that allows some deltas, but not on relevant files.