Failed Build with Mercurial 2.1 "no changes found"

We have a production teamCity server and it's working great (TeamCity 6.5.6 (build 18130) released on 26/05/11, currently running in the enterprise mode.)

On this production TC, we are using mercurial 1.8.4.  Everything works great.


We have brought up a development tc server so we could test some tools prior to releasing to the production server and have set up 1 build definition (which is basically a copy of one from production).  It fails every time with the error:  "No Changes Found."


On the development server we are running the latest TC (TeamCity 6.5.6 (build 18130) released on 26/05/11, currently running in the  professional mode.)  On this dev server, we are using mercurial 2.1.

Debugging Done So Far

In my research I have found that mercurial has changed the return code of the hg pull command.  In the older version hg pull returned an errorLevel of 0 if no changes were found.  In the new version, it returns 1.

I changed the build definition so that it would ignore the return code.  I thought it would just run the hg pull then continue, but it keeps failing.


So, I went to the dev team city server and paused the build definition.  I also stopped the team city services (web & agent) so I could test the mercurial part.  On my local machine I made some changes to the mercurial repository and pushed them to the hosting provider (bitbucket.org).  I opend a command window on the dev TC server and executed "hg incoming."  I could see the changesets I had pushed in the list of changes.  I tried the "hg incoming" several times just to make sure there wasn't a side effect.  Each time it showed my change sets.

I kept that command window open and started the teamcity services (web & agent).  (Remember that my build definition is paused.)  I then ran the "hg incoming" command again in the command window.  It returned "no changes found."

I'm stumped at this point.  Why is TC pulling the changes even though the build definition is paused?

Here is the build settings:

General Settings  

Name: _Deployment-Default
Description: Build The DeploymentConsole  Application
Build number format: 1.2.0.{0}, next build  number: #1.2.0.26
Artifact paths:
build_output\results\*.zip
build_output\nuget\*.nupkg

Fail build if:
process exit code is not zero: OFF
at least one test failed: OFF
an error message is logged by build runner:  OFF
it runs longer than: no limit
out of memory or crash is detected:  ON

Build options:
hanging builds detection: ON
status widget: OFF
maximum number of simultaneously running builds:  1

Version Control Settings  

VCS checkout mode: Automatically on server
Checkout directory: default
Clean all files before build: OFF
VCS labeling: disabled
Attached VCS roots:
Name Checkout rules Set label
Deployment (main) not specified NO

Build Step: Command Line  

Step 1: Compile
Runner type: Command Line (Simple command  execution)
Working directory: same as checkout  directory
Command executable: %CommandExecutable%
Command parameters: %CommandParameters%

Build features:
There are no build features configured.

Build Triggering  

Build configuration is paused (triggering disabled).
Build triggers:
There are no build triggers configured.

Dependencies  

Snapshot Dependencies:
There are no snapshot dependencies.

Artifact dependencies:
There are no artifact dependencies.

Build Parameters  

Configuration parameters:
Name Value
CommandExecutable psake.bat
CommandParameters ci

System properties: none  defined
Environment variables: none  defined

Agent Requirements  

none defined


Message was edited by: Daniel Williams  The repository seems to be located at: C:\TeamCity656\BuildServerConfiguration\system\caches\mercurial\hg_4786738693813304330\  The only thing in this folder is a directory called .hg.

Message was edited by: Daniel Williams

Tried to change the VCS Settings to checkout mode "Automatically on agent (if supporeted by VCS roots).  No difference.  Here's the actual build log:

Unable to collect changes java.util.concurrent.ExecutionException: jetbrains.buildServer.vcs.VcsException: Problem collecting changes for 'Deployment :: _Deployment-Default' : 'hg.exe pull https://******:******@bitbucket.org/xxxxx/deployment' command failed. stdout: pulling from https://*****:***@bitbucket.org/xxxxxx/deployment searching for changes no changes found        at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source)      at java.util.concurrent.FutureTask.get(Unknown Source)      at jetbrains.buildServer.serverSide.impl.CancelableTaskHolder.waitForTaskToComplete(CancelableTaskHolder.java:14)      at jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl.doCollectChanges(TopBuildDependencyGraphImpl.java:31)      at jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl.access$000(TopBuildDependencyGraphImpl.java:95)      at jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl$3.run(TopBuildDependencyGraphImpl.java)      at jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl$3.run(TopBuildDependencyGraphImpl.java:1)      at jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl$4.run(TopBuildDependencyGraphImpl.java)      at jetbrains.buildServer.serverSide.impl.auth.SecurityContextImpl.runAs(SecurityContextImpl.java:24)      at jetbrains.buildServer.serverSide.impl.auth.SecurityContextImpl.runAsSystem(SecurityContextImpl.java:18)      at jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl.runAsSystem(TopBuildDependencyGraphImpl.java:51)      at jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl.collectChangesForGraph(TopBuildDependencyGraphImpl.java:62)      at jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl.collectChangesForGraph(TopBuildDependencyGraphImpl.java:73)      at jetbrains.buildServer.serverSide.impl.BuildChangesCollector.collectChangesForBuild(BuildChangesCollector.java:1)      at jetbrains.buildServer.serverSide.impl.BuildStarter$1.run(BuildStarter.java:38)      at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)      at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)      at java.util.concurrent.FutureTask.run(Unknown Source)      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)      at java.lang.Thread.run(Unknown Source) Caused by: jetbrains.buildServer.vcs.VcsException: Problem collecting changes for 'Deployment :: _Deployment-Default' : 'hg.exe pull https://newcobuildmaster:******@bitbucket.org/newco/deployment' command failed. stdout: pulling from https://newcobuildmaster:***@bitbucket.org/newco/deployment searching for changes no changes found        at jetbrains.buildServer.vcs.impl.BuildChangesLoaderContext$BuildTypeCollectorResult.reThrowProblemException(BuildChangesLoaderContext.java:34)      at jetbrains.buildServer.vcs.impl.BuildChangesLoaderContext$BuildTypeCollectorResult.access$1100(BuildChangesLoaderContext.java:26)      at jetbrains.buildServer.vcs.impl.BuildChangesLoaderContext.checkNoProblemsInMyBuildTypes(BuildChangesLoaderContext.java:94)      at jetbrains.buildServer.vcs.impl.BuildChangesLoaderContext.checkingForChangesFinished(BuildChangesLoaderContext.java:97)      at jetbrains.buildServer.vcs.impl.VcsChangesCollectorImpl$1.call(VcsChangesCollectorImpl.java:1)      at jetbrains.buildServer.vcs.impl.VcsChangesCollectorImpl$1.call(VcsChangesCollectorImpl.java:5)      ... 5 more Caused by: jetbrains.buildServer.vcs.VcsException: 'hg.exe pull https://newcobuildmaster:******@bitbucket.org/newco/deployment' command failed. stdout: pulling from https://newcobuildmaster:***@bitbucket.org/newco/deployment searching for changes no changes found        at jetbrains.buildServer.buildTriggers.vcs.mercurial.command.CommandUtil.commandFailed(CommandUtil.java:57)      at jetbrains.buildServer.buildTriggers.vcs.mercurial.command.CommandUtil.checkCommandFailed(CommandUtil.java:43)      at jetbrains.buildServer.buildTriggers.vcs.mercurial.command.CommandUtil.runCommand(CommandUtil.java:122)      at jetbrains.buildServer.buildTriggers.vcs.mercurial.command.CommandUtil.runCommand(CommandUtil.java:101)      at jetbrains.buildServer.buildTriggers.vcs.mercurial.command.BaseCommand.runCommand(BaseCommand.java:120)      at jetbrains.buildServer.buildTriggers.vcs.mercurial.command.PullCommand.execute(PullCommand.java:38)      at jetbrains.buildServer.buildTriggers.vcs.mercurial.MercurialVcsSupport.syncRepository(MercurialVcsSupport.java:483)      at jetbrains.buildServer.buildTriggers.vcs.mercurial.MercurialVcsSupport.getCurrentVersion(MercurialVcsSupport.java:261)      at jetbrains.buildServer.vcs.impl.VcsRootInstancesManagerImpl$SVcsRootInstance.getCurrentRevision(VcsRootInstancesManagerImpl.java:5)      at jetbrains.buildServer.vcs.impl.VcsManagerImpl.getRevisionsForAllRoots(VcsManagerImpl.java:444)      at jetbrains.buildServer.vcs.impl.VcsManagerImpl.loadChanges(VcsManagerImpl.java:62)      at jetbrains.buildServer.serverSide.impl.auth.SecuredVcsManager.loadChanges(SecuredVcsManager.java:75)      at jetbrains.buildServer.vcs.impl.VcsChangesCollectorImpl$2.call(VcsChangesCollectorImpl.java:3)      at jetbrains.buildServer.vcs.impl.VcsChangesCollectorImpl$2.call(VcsChangesCollectorImpl.java)      ... 5 more [12:52:24]: java.util.concurrent.ExecutionException: jetbrains.buildServer.vcs.VcsException: Problem collecting changes for 'Deployment :: _Deployment-Default' : 'hg.exe pull https://newcobuildmaster:******@bitbucket.org/newco/deployment' command failed. stdout: pulling from https://newcobuildmaster:***@bitbucket.org/newco/deployment searching for changes no changes found   java.util.concurrent.ExecutionException: jetbrains.buildServer.vcs.VcsException: Problem collecting changes for 'Deployment :: _Deployment-Default' : 'hg.exe pull https://newcobuildmaster:******@bitbucket.org/newco/deployment' command failed. stdout: pulling from https://newcobuildmaster:***@bitbucket.org/newco/deployment searching for changes no changes found        at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source)      at java.util.concurrent.FutureTask.get(Unknown Source)      at jetbrains.buildServer.serverSide.impl.CancelableTaskHolder.waitForTaskToComplete(CancelableTaskHolder.java:14)      at jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl.doCollectChanges(TopBuildDependencyGraphImpl.java:31)      at jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl.access$000(TopBuildDependencyGraphImpl.java:95)      at jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl$3.run(TopBuildDependencyGraphImpl.java)      at jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl$3.run(TopBuildDependencyGraphImpl.java:1)      at jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl$4.run(TopBuildDependencyGraphImpl.java)      at jetbrains.buildServer.serverSide.impl.auth.SecurityContextImpl.runAs(SecurityContextImpl.java:24)      at jetbrains.buildServer.serverSide.impl.auth.SecurityContextImpl.runAsSystem(SecurityContextImpl.java:18)      at jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl.runAsSystem(TopBuildDependencyGraphImpl.java:51)      at jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl.collectChangesForGraph(TopBuildDependencyGraphImpl.java:62)      at jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl.collectChangesForGraph(TopBuildDependencyGraphImpl.java:73)      at jetbrains.buildServer.serverSide.impl.BuildChangesCollector.collectChangesForBuild(BuildChangesCollector.java:1)      at jetbrains.buildServer.serverSide.impl.BuildStarter$1.run(BuildStarter.java:38)      at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)      at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)      at java.util.concurrent.FutureTask.run(Unknown Source)      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)      at java.lang.Thread.run(Unknown Source) Caused by: jetbrains.buildServer.vcs.VcsException: Problem collecting changes for 'Deployment :: _Deployment-Default' : 'hg.exe pull https://newcobuildmaster:******@bitbucket.org/newco/deployment' command failed. stdout: pulling from https://newcobuildmaster:***@bitbucket.org/newco/deployment searching for changes no changes found        at jetbrains.buildServer.vcs.impl.BuildChangesLoaderContext$BuildTypeCollectorResult.reThrowProblemException(BuildChangesLoaderContext.java:34)      at jetbrains.buildServer.vcs.impl.BuildChangesLoaderContext$BuildTypeCollectorResult.access$1100(BuildChangesLoaderContext.java:26)      at jetbrains.buildServer.vcs.impl.BuildChangesLoaderContext.checkNoProblemsInMyBuildTypes(BuildChangesLoaderContext.java:94)      at jetbrains.buildServer.vcs.impl.BuildChangesLoaderContext.checkingForChangesFinished(BuildChangesLoaderContext.java:97)      at jetbrains.buildServer.vcs.impl.VcsChangesCollectorImpl$1.call(VcsChangesCollectorImpl.java:1)      at jetbrains.buildServer.vcs.impl.VcsChangesCollectorImpl$1.call(VcsChangesCollectorImpl.java:5)      ... 5 more Caused by: jetbrains.buildServer.vcs.VcsException: 'hg.exe pull https://newcobuildmaster:******@bitbucket.org/newco/deployment' command failed. stdout: pulling from https://newcobuildmaster:***@bitbucket.org/newco/deployment searching for changes no changes found        at jetbrains.buildServer.buildTriggers.vcs.mercurial.command.CommandUtil.commandFailed(CommandUtil.java:57)      at jetbrains.buildServer.buildTriggers.vcs.mercurial.command.CommandUtil.checkCommandFailed(CommandUtil.java:43)      at jetbrains.buildServer.buildTriggers.vcs.mercurial.command.CommandUtil.runCommand(CommandUtil.java:122)      at jetbrains.buildServer.buildTriggers.vcs.mercurial.command.CommandUtil.runCommand(CommandUtil.java:101)      at jetbrains.buildServer.buildTriggers.vcs.mercurial.command.BaseCommand.runCommand(BaseCommand.java:120)      at jetbrains.buildServer.buildTriggers.vcs.mercurial.command.PullCommand.execute(PullCommand.java:38)      at jetbrains.buildServer.buildTriggers.vcs.mercurial.MercurialVcsSupport.syncRepository(MercurialVcsSupport.java:483)      at jetbrains.buildServer.buildTriggers.vcs.mercurial.MercurialVcsSupport.getCurrentVersion(MercurialVcsSupport.java:261)      at jetbrains.buildServer.vcs.impl.VcsRootInstancesManagerImpl$SVcsRootInstance.getCurrentRevision(VcsRootInstancesManagerImpl.java:5)at jetbrains.buildServer.vcs.impl.VcsManagerImpl.getRevisionsForAllRoots(VcsManagerImpl.java:444)at jetbrains.buildServer.vcs.impl.VcsManagerImpl.loadChanges(VcsManagerImpl.java:62)at jetbrains.buildServer.serverSide.impl.auth.SecuredVcsManager.loadChanges(SecuredVcsManager.java:75)at jetbrains.buildServer.vcs.impl.VcsChangesCollectorImpl$2.call(VcsChangesCollectorImpl.java:3)at jetbrains.buildServer.vcs.impl.VcsChangesCollectorImpl$2.call(VcsChangesCollectorImpl.java)... 5 more

Message was edited by: Daniel Williams

Moved the data directory to c:\TC656Data.  No change.

Note:  With the server started and the build paused, I made changes in the clone of the repository on my local computer and pushed them back up to bitbucket.  I used hg incoming on the new (dev) teamcity server.  I could see the changes I made for a while and then they stopped showing up.  Somehow the repository had a pull done w/o the build running.

Note 2:  When changing the tomcat settings to move the data file, I had to change the virutal machine from "use default" to the actual path to the server.dll file in the jre/bin/server directory.  (In case someone else tries to move the datafile and the service fails to start afterwards.)

4 comments
Comment actions Permalink

Had the same problem with 2.1. Reverted to 2.0 everythings works fine.  

0
Comment actions Permalink

Thank you.  Sounds like a good idea.

I can't find a download for mercurial 2.0.  Every download I can find for mercurial has 2.1.  Even the TortoiseHG (that says it has 2.0.2) has 2.1 included.

Do you have a link by chance?

0
Comment actions Permalink

Found an older TortoiseHG download that installed mercurial 1.9.3.  That solved it.

http://tortoisehg.bitbucket.org/download/index.html

0
Comment actions Permalink

You can also install a build of hg-plugin with fix from http://teamcity.jetbrains.com/viewType.html?buildTypeId=bt242&tab=buildTypeStatusDiv , its number is #snapshot-58

0

Please sign in to leave a comment.