bzr4j with TeamCity and sftp strips path from sftp URI

Asked by Russ Cam

Using the bzr4j plugin for TeamCity to provide support for Bazaar, I have experienced two problems.

The first problem is to do with ssh connection messages. After establishing a successful connection via sftp, the ssh server returns some "messages of the day" e.g.

from the command line:

bzr info sftp://username@host/path
Connected (version 2.0, client 9.99)
SSH username@host password: (password here)
Authentication (password) successful!
Secsh channel 1 opened.
[chan 1] Opened sftp connection (server version 3)
Shared repository (format: 2a)
Location:
  shared repository: sftp://username@host/path

from testing the connection in TeamCity however, the following error occurs:

Exit value: 0 ; Working dir:
"c:\TeamCity\bin"
--- STDERR ---
Connected (version 2.0, client 9.99)

Authentication (password) successful!
Secsh channel 1 opened.
[chan
1] Opened sftp connection (server version 3)

---- ARGS
----
bzr
revno
--no-aliases
sftp://username:password@host/path
--------------

the "messages of the day" are followed by the expected response. The bzr4j plugin does not appear to handle the presence of the connection messages and interprets the response as a connection error, at least when testing the connection. If we try to run a TeamCity build configuration that uses this VCS root, the following output is exhibited. The Pull changes from URI is set to sftp://username:password@host/path -q :

Failed to start build

Failed to collect changes, error: org.emergent.bzr4j.core.cli.BzrExecException: Exit value: 3 ; Working dir: "c:\TeamCity\bin"

--- STDERR ---

Connected (version 2.0, client 9.99)

Authentication (password) successful!

Secsh channel 1 opened.

[chan 1] Opened sftp connection (server version 3)

bzr: ERROR: Not a branch: "sftp://username:password@host/.bzr/branch/": location is a repository.

---- ARGS ----

bzr

revno

--no-aliases

sftp://username:password@host

--------------

So, it looks like the VCS root set up is working correctly, but the command is failing because the /path which points to the branch has been stripped from the value specified "Pull changes from URI " in the VCS root. For info, the Baazar repository is set up as a shared repository with no working trees.

So my question is, am I doing something wrong with the setup or is this a bug/limitation with bzr4j?

Many thanks for your time.

Question information

Language:
English Edit question
Status:
Expired
For:
bzr4j Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.