TeamCity 'Edit VCS Root' 'Test connection' button fails with java.io.IOException

Bug #556223 reported by Bob Hournbuckle
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bzr4j
New
Undecided
Unassigned

Bug Description

1) Create a local bzr repo, i.e. file:///bzr/app
2) Attempt to set it as a vcs root in Teamcity "Administration > Edit Build Configuration > Edit VCS Root" and hit the "Test connection" button at the bottom.
3) A java.io.IOException occurs (see snippet below):
[2010-04-02 19:52:39,860] WARN [ion=addVcsRoot ] - jetbrains.buildServer.VCS - Error occurred in test connection
jetbrains.buildServer.vcs.VcsException: org.emergent.bzr4j.core.cli.BzrExecException: java.io.IOException: Cannot run program "bzr" (in directory "/home/name/.BuildServer/system/caches/bazaar/bzr_-5093388796668072577"): java.io.IOException: error=2, No such file or directory
        at jetbrains.buildServer.buildTriggers.vcs.bazaar.BazaarVcsSupport.testConnection(BazaarVcsSupport.java:213)
        at jetbrains.buildServer.controllers.admin.projects.EditVcsRootsController.doPost(EditVcsRootsController.java:9)
...

ROOT cause - the spawned process attempts to change to the default vcs root bzr_-5093388796668072577 which does not exist, even though the command it's performing (bzr info url) doesn't need to be in the VCS root.

Proposed fix - see http://bazaar.launchpad.net/~bhournbuckle/bzr4j/tc-fixclone-trunk/revision/27/modules/core/src/main/java/org/emergent/bzr4j/core/cli/BzrAbstractExec.java which also fixes a bug when cloning a new vcs root.

Basically it references a (new) list of bzr commands that require the working dir to be the parent of the BazaarRoot. Though commands such as "info" and "check" could be ROOTLESS, the repo url is still required it was simpler to just let the process attempt to run from the parent directory as "clone" and "branch" must.

Revision history for this message
Bob Hournbuckle (bhournbuckle) wrote :

Rather than create a seperate bug, this error also occurs when trying to "Run" any build agent using a bzr VCS root.

Pretty much same root cause, io exception when trying to run "clone" from the BazaarRoot that hasn't been created yet (only the parent was created). Again see for possible fix: http://bazaar.launchpad.net/~bhournbuckle/bzr4j/tc-fixclone-trunk/revision/27/modules/core/src/main/java/org/emergent/bzr4j/core/cli/BzrAbstractExec.java

Note, other commands may need similar treatment, such as "export".

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.