Merge lp:~jameinel/juju-core/1.18-scp-multiple-args-1306208 into lp:juju-core/1.18
Status: | Merged |
---|---|
Merged at revision: | 2268 |
Proposed branch: | lp:~jameinel/juju-core/1.18-scp-multiple-args-1306208 |
Merge into: | lp:juju-core/1.18 |
Diff against target: |
398 lines (+158/-79) 7 files modified
cmd/juju/scp.go (+35/-35) cmd/juju/scp_test.go (+100/-27) utils/ssh/ssh.go (+3/-3) utils/ssh/ssh_gocrypto.go (+1/-1) utils/ssh/ssh_gocrypto_test.go (+1/-1) utils/ssh/ssh_openssh.go (+5/-6) utils/ssh/ssh_test.go (+13/-6) |
To merge this branch: | bzr merge lp:~jameinel/juju-core/1.18-scp-multiple-args-1306208 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ian Booth | Approve | ||
Review via email: mp+215301@code.launchpad.net |
Commit message
This changes how "juju scp" parses its arguments, to restore the ability to put flags in more places on the command line.
This does the 'expand' logic differently. If something looks like it starts with an identifier: then it tries to expand it (like it did previously). But it allows that to happen anywhere in the args list, rather than all but the last arg.
The one thing we don't support (but we didn't support before, either), is "juju scp 0:foo myhost:bar", because we always lookup the stuff before the : as a PublicAddress lookup.
I'm not sure that this is 100% perfect, but I do think it is a step in the right direction.
I'm targetting 1.18.1 because I think the behavior of 1.18 is a regression from 1.16 since old command lines no longer work.
Description of the change
This changes how "juju scp" parses its arguments, to restore the ability to put flags in more places on the command line.
This does the 'expand' logic differently. If something looks like it starts with an identifier: then it tries to expand it (like it did previously). But it allows that to happen anywhere in the args list, rather than all but the last arg.
The one thing we don't support (but we didn't support before, either), is "juju scp 0:foo myhost:bar", because we always lookup the stuff before the : as a PublicAddress lookup.
I'm not sure that this is 100% perfect, but I do think it is a step in the right direction.
I'm targetting 1.18.1 because I think the behavior of 1.18 is a regression from 1.16 since old command lines no longer work.
The attempt to merge lp:~jameinel/juju-core/1.18-scp-multiple-args-1306208 into lp:juju-core/1.18 failed. Below is the output from the failed tests.
# launchpad. net/juju- core/cmd/ plugins/ juju-restore juju-restore/ restore. go:437: too many arguments in call to "launchpad. net/juju- core/utils/ ssh".Copy
cmd/plugins/
mongod: no process found