Question

I am getting the following error while running build in teamcity.

Failed to collect changes, error: '"C:\Program Files\TortoiseHg\hg.exe" --config ui.interactive=False pull https://test:******@hg.myrepo.co.uk/terriff' command failed.
stdout: pulling from https://test:***@hg.myrepo.co.uk/terriff
searching for changes

stderr: abort: abandoned transaction found - run hg recover!

I already tried to delete the build directories on agent machines but still getting same error. Also tried to run hg recover command but it says repository is not local. Please guide how to fix this error.

Was it helpful?

Solution 4

Yeah, that command will have to be run on the remote host (for example, via a shell).

OTHER TIPS

I have the same issue, because my hg folder was missing from the repository folder. I managed to fix it running hg recover on the cached version of the repository. You can find the cached repository at the following directory:

..\ProgramData\JetBrains\TeamCity\system\caches\mercurial

You should see a few folders with the names like hg_7282240431393414416 and a file map(with no extension) at that folder. There are mappings from repository to folders stored in this file. The file contains a few lines like:

https://bitbucket.org/{teamname1}/{repo1}/ = hg_7282240431393414416
https://bitbucket.org/{teamname1}/{repo2}/ = hg_7282240431393414417
https://bitbucket.org/{teamname2}/{repo3}/ = hg_7282240431393414418

You have to find the folder corresponding to your repository(after the equation sign) in this map file and run hg recover in that corresponding folder. Running this command may take some time.

Please, note: team names, repositories and folder names are for demonstration only.

I hope it will help!

Ok, I faced the same issue today and this is how I fixed it!

  1. If you are running it in Windows, then open Command Prompt.
  2. Type,

    hg recover -R "remote-path-of-your-repository"

  3. It might take a while until the command completes.

I got the same issue and i fixed this by trashing the cache/mercurial directory of TEAMCITY. It may be not the best thing to do, but it's now working. The problem with HG comes from one of the subfolders of team citycache...

I took me about 5 hours to understand it! Damn!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top