Fails to update tree if port is specified in URL

Bug #388881 reported by Matt Nordhoff
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Plugin to Update Remote Trees
Triaged
Medium
Unassigned

Bug Description

lp:bzr r4459, lp:bzr-push-and-update r12.

$ bzr push bzr+ssh://<email address hidden>:2222/branch/
running "ssh <email address hidden>:2222 bzr update "/branch/""
ssh: example.com:2222: Name or service not known
This transport does not update the working tree of: bzr+ssh://<email address hidden>:2222/branch/. See 'bzr help working-trees' for more information.
Pushed up to revision 123.

bzr-push-and-update needs to separate out the port from the hostname and pass it to ssh in the correct way (ssh -p 2222 user@...).

description: updated
Revision history for this message
The Pixel Developer (thepixeldeveloper) wrote :

I've got the same problem.

Fixed with the following patch,

Changed line 153 to

cmd = ['ssh', user+host, '-p', port.lstrip(':'), remote_bzr, 'update', path]

Revision history for this message
corentin barbu (corentin-barbu) wrote :

Same problem, same kind of patch:

 if port:
        port = '-p %s' % (port,)
    else:
        port = ''

    if path.startswith('/~/'):
        path = path[3:] # This is meant to be a relative path

    remote_bzr = target_branch.get_config().get_bzr_remote_path()
    # The path needs to be double escaped. We pass it to ssh as a single
    # argument, but ssh passes it to the child shell as a whole string.
    path = '"%s"' % (path,)
    cmd = ['ssh', port,user+host, remote_bzr, 'update', path]

Jelmer Vernooij (jelmer)
Changed in bzr-push-and-update:
status: New → Triaged
importance: Undecided → Medium
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.