Automatic merge feature conflicts with Branch Remote Run Trigger settings

I try to create Pre-Tested commit using Git and TC. I want to pull changes from  refs/heads/artemPersonal   branch using personal builds,  build, test and then  push them to green repository  branch called refs/heads/develop
1. I added a Branch Remote Run Trigger with root: refs/heads/artemPersonal
2. I added an Automatic merge feature with  settings:
Watch build in branches:   +:refs/heads/artemPersonal
Merge to branch:               refs/heads/develop

My VCS Root looks like:
default branch: refs/heads/develop
Branch spec: -:refs/heads/artemPersonal

But it doesnt work, and looks like this too approaches conflocts one to each other.

For example, if I set:

1) VCS Root
default branch: refs/heads/develop
Branch spec: empty


default branch: refs/heads/artemPersonal
Branch spec: +:refs/heads/develop

then Automatic merge  works without problems. While Branch Remote Run Trigger doesn't run.  But there is an item in a Pending queue (displayed like Pending(1)   ) of the TC project for that branch. So it detected changes on VCS server. And if I run build from UI manually it works and merges fine. (But not like personal build)
In log file it says:

Branch 'refs/heads/artemPersonal' in VCS root '"WebSite Development Pre-tested Commits" {instance id=26, parent internal id=2, parent id=WebSite_WebSiteDevelopmentPreTestedCommits, description: ""}' in buidlType 'WebSite :: WebUI develop Pre-Tested Commits {id=WebSite_WebUIDevelop_WorkingCodeOnly, internal id=bt2}' is matched by branchSpec, branch will be ignored

I don't understand why is it matched to empty branch spec. But it does.

if I set:
2) VCS Root
default branch: refs/heads/develop
Branch spec:   -:refs/heads/artemPersonal

Then Branch Remote Run Trigger  works ok. Because trigger doesn't find artemPersonal in branchSpec (according to documentation)
While Automatic merge  doesn't work and even  don't log enything to VCS log. Becuase as mentiond in this topic: the branch should set as default or mentioned in branch spec:  while it's doesn't, because of the requirements from Branch Remote Run Trigger.

But it looks like contrediction

The only one thin in server log says about merge problems:
rver.vcs.impl.MergeManagerImpl - Cannot find a VCS name of the branch 'refs/heads/artemPersonal' in a VCS root "WebSite Development Pre-tested Commits" {instance id=23, parent internal id=2, parent id=WebSite_WebSiteDevelopmentPreTestedCommits, description: ""}, build #39 {build id=149}. Skip merging this VCS root sources.

But the name was set in  My Settings & Tools->Default for all of the VCS root = asartem. and it was working for previous example configuration.
As  well as it was set in VCS root  settings of configuration as Username for tags/merge: = asartem

Also it too difficult to debug automatic merge feature problems. Even Debug mode doesn't help when dest. branch (refs/heads/develop) was not set as default and TC doesn't see it and doesnt worry about it. Thanks to your forum and  answer in that topic, otherwise it's impossible to figure out the problem.

Comment actions Permalink

Hi Artem,

Thank you for your feedback.
Yes, you are right, it is not possible to use Branch Remote Run trigger together with Automatic Merge feature. All branches that are used in Automatic Merge feature must be included into the Branch Specification, I've update documentation to make it clearer.
As for now we would recommend you to use VCS trigger instead of Remote Run trigger.
Regarding debugging Automatic Merge we have two issues -, Please watch/vote for them.

Comment actions Permalink

   Thanks for fixing documentation. But for now it's not clear for me  and for others how does the  Pre-Tested Commit  approach  works with the problem of non working Automatic merge? So, there is a recomendation in docs to use Branch Remote Run Trigger (maybe instead of VCS)  for Pre-Tested approach. And it's right, becuase the DEV branch should have a working and tested code. As for me it's still not clear what is the key difference and which situations should I prefere VCS and in which BRR trigger. Maybe it's good to clearify it with some example.

  Also, they say, that user have to have own branch and merge it with DEV while it is working. So, there is logical question: how should developer work with CI and Pre-Tested Commit approach while the merge doesn't work? As I understood, you recommeds me to use VCS. It's ok. But why did documentation recommends Branch Remote Run ? I'm sure there should be some reason.


Comment actions Permalink


I’ve created an issue, please watch/vote for it. Also please describe in comment to this issue your use case. Why do you need to use this features simultaneously?


Please sign in to leave a comment.