VCS Trigger with filter on P4 triggers on unrelated files

I have a VCS Root connected to a Perforce stream that contains several separate project folders. I've added VCS Triggers to my build configurations with a file filter to only trigger when files within a folder are modified (eg: `+:root=MyProject_Main:/MyProjectFolder/**` with branch filter `+://tools/release`). This triggers a build even if no files within `MyProjectFolder` are modified.

I've dug through the logs and found a few suspicious lines that seem to indicate TeamCity is including merged file changes in the file list, but I can't find any documentation of that behavior.
In teamcity-vcs.log:

[2022-08-04 21:35:01,928]   INFO [ical executor 1] -   jetbrains.buildServer.VCS.P4 - Detected merge revision null for ModificationData{myUser='USERNAME', myDescription='MY CHANGE DESCRIPTION', myVcsDate=Thu Aug 04 21:33:54 UTC 2022, myChanges=[VcsChange{myChangeTypeName='null',myFileName='//tools/release/',myRelativeFileName=MyProjectFolder/MyProjectName.csproj,myType=CHANGED,myBeforeChangeRevisionNumber='1',myAfterChangeRevisionNumber='2',myFileNameIsTruncated=true}],myVersion='release|39966',myDisplayVersion='39966',myChangesCount=8,myCanBeIgnored=true,myParentRevisions=[]}


Does anybody know what might be happening here? If my guess about merge history is correct is there any way to disable that?

Please sign in to leave a comment.