Versioned settings changes cannot be applied
We started using versioned settings (Kotlin DSL) some time ago and did some refactoring of the Kotlin files in order to make it more maintainable.
We never change any of the package/file names or ID's after they have been committed only refactoring contents and script blocks etc..
However we often run into issues when someone merges changes via pull-requests via Bitbucket. The Versioned Settings view in Teamcity shows:
Current Status:
[11:23:05]: Cannot find previous revision of projects: [RootProjectName, RootProjectName_MyConfig, RootProjectName_MyConfig_ChildBuild, and 22 more projects], skip updating settings to revision 08962dd295c0f2710835cd56e90ae8ce949c1cc5.
If I allow Teamcity to commit the current changes to VCS it prepends the RootProjectName to most of the Kotlin file and replaces Self_ with RootProjectName:
package Self_.buildTypes
object MyConfig : Template({ ...
becomes
package RootProjectName.buildTypes
object RootProjectName_MyConfig : Template({
id("MyConfig") ...
If I simple let it commit these changes and then revert the commit everything is applied without issues.
This issues never occurs if I push changes directly to the VCS without a pull-request.
What could be the issue and how do we resolve this permanently?
Please sign in to leave a comment.