jenkinsci / plasticscm-plugin

A plugin for Jenkins to be able to use Plastic SCM
MIT License
16 stars 31 forks source link

Fix update command changing workspace configuration #33

Closed ahatala closed 3 years ago

ahatala commented 4 years ago

Recent versions of the plastic CLI switch the workspace selector to point to the latest change in branch by default when calling "cm update". This breaks the ability to sync to a given changeset and causes more comples builds to potentially use different versions.

This restores the old behavor of "cm update" by adding the somewhat undocumented flag "--changeset" without value.

mig42 commented 4 years ago

Hi @ahatala ,

Did you try this new behavior using branch-based selectors? Does it keep the previous behaviour? I.e. it always updates the branch contents to the latest in the branch when there are new changesets.

ahatala commented 4 years ago

Indeed it does, "cm update --changeset" with a branch-based selector updates the workspace to the latest in branch.

ahatala commented 4 years ago

The behaviour change happened in client version 8.0.16.3470, the patch should be modified to conditionally add the "--changeset" flag when version is greater or equal.

mig42 commented 4 years ago

I'll have a look at the issue. Right now it seems more sensible to me to find out whether the current selector is a branch-based one and only run a regular cm update in that case.

ahatala commented 4 years ago

Yep, that would probably be a better fix.

knapsu commented 3 years ago

Hi @ahatala. Sorry for not writing to you sooner. It seems I was not receiving any notifications from GitHub about pull requests or bug reports. Clicked "Watch everything" so I will not miss those again.

Proper fix for this is being authored in pull request #35. Will close this PR.