Comment 2 for bug 388881

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]