Remote Run in IntelliJ - Failed to collect VCS paths: Cannot determine base revision. Please check the current branch has tracking branch that is watched by TeamCity

Hi guys, we have a build configuration for testing branches with the following setup in "Branch specification:"
+:refs/heads/*
-:refs/heads/release/*
-:refs/heads/master

However, when I try to remote-run from IntelliJ inside my feature/cool-branch, I always get "Failed to collect VCS paths: Cannot determine base revision. Please check the current branch has tracking branch that is watched by TeamCity"

The idea logs contain the following messages:

2018-04-10 13:34:44,342 [93516196] DEBUG - delayedCommit.RemoteRunSession - Cannot determine base revision. Please check the current branch has tracking branch that is watched by TeamCity
com.intellij.openapi.vcs.VcsException: Cannot determine base revision. Please check the current branch has tracking branch that is watched by TeamCity
at jetbrains.buildServer.delayedCommit.GitIdeaSupport7.getRepositoryLocation(GitIdeaSupport7.java:52)
at jetbrains.buildServer.delayedCommit.VcsIdeaSupportBean.getRepositoryLocation(VcsIdeaSupportBean.java:92)
at jetbrains.buildServer.ideaPlugin.util.VcsUtil.getRelativeFile(VcsUtil.java:376)
at jetbrains.buildServer.ideaPlugin.util.VcsUtil.collectFullPaths(VcsUtil.java:345)
at jetbrains.buildServer.delayedCommit.RemoteRunSession$5.run(RemoteRunSession.java:320)
at jetbrains.buildServer.BuildServerManager$32.run(BuildServerManager.java:1227)
at jetbrains.buildServer.BuildServerManager$31.run(BuildServerManager.java:1207)
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:726)
at com.intellij.openapi.progress.impl.CoreProgressManager$6.run(CoreProgressManager.java:410)
at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:176)
at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:556)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:501)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:66)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:163)
at com.intellij.openapi.application.impl.ApplicationImpl.a(ApplicationImpl.java:594)
at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:334)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.intellij.openapi.vcs.VcsException: Cannot determine base revision. Please check the current branch has tracking branch that is watched by TeamCity
at jetbrains.buildServer.delayedCommit.GitIdeaSupport7.getRepositoryLocation(GitIdeaSupport7.java:40)
... 20 more

On the other hand, I can remote-run from master branch which has just +:refs/heads/(master) in "Branch specification:" on TeamCity server. Can you please advise what could go wrong with such a setup? I can provide more details if needed

2
2 comments

Hi Dmitry,

 

Most probably error is shown because plugin is unable to determine branch upstream. Could you please share part of .git/config which describes branches?

1
Avatar
Permanently deleted user

Thanks, Vladislav. You are right, the upstream branch was not set up. I just ran

git branch --set-upstream-to=origin/cool-feature

to set the upstream branch for my local branch and it works now. The reason it was not set in the first place is that I had pushed my branch without -u option from the command line:

git push origin HEAD

It should have been as follows;

git push -u origin HEAD

As a side note, if I push from IntellJ the upstream branch is set up

0

Please sign in to leave a comment.