Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(383)

Issue 67820048: cmd/juju: Improvements and minor fixes to ssh/scp (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 2 months ago by dimitern
Modified:
10 years, 2 months ago
Reviewers:
axw, mp+207986, natefinch
Visibility:
Public.

Description

cmd/juju: Improvements and minor fixes to ssh/scp This CL mostly deals with suggestions from the last review (https://codereview.appspot.com/66340045/), which arrived after landing. Summary of the changes: - scp using go.crypto has a better error message; - scp now accepts extra args last only, and no need for --; - scp works correctly with nodes that have public IPv6 address; - improved and rephrased help text for scp. https://code.launchpad.net/~dimitern/juju-core/303-ssh-scp-improvements/+merge/207986 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 2

Patch Set 2 : cmd/juju: Improvements and minor fixes to ssh/scp #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+86 lines, -47 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/juju/scp.go View 5 chunks +23 lines, -18 lines 2 comments Download
M cmd/juju/scp_test.go View 3 chunks +57 lines, -25 lines 1 comment Download
M utils/ssh/ssh.go View 1 1 chunk +2 lines, -2 lines 0 comments Download
M utils/ssh/ssh_gocrypto.go View 1 chunk +1 line, -1 line 0 comments Download
M utils/ssh/ssh_gocrypto_test.go View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 4
dimitern
Please take a look.
10 years, 2 months ago (2014-02-24 17:29:05 UTC) #1
natefinch
LGTM https://codereview.appspot.com/67820048/diff/1/utils/ssh/ssh.go File utils/ssh/ssh.go (right): https://codereview.appspot.com/67820048/diff/1/utils/ssh/ssh.go#newcode72 utils/ssh/ssh.go:72: // Copy copies file(s) between local and/ remote ...
10 years, 2 months ago (2014-02-24 17:44:25 UTC) #2
dimitern
Please take a look. https://codereview.appspot.com/67820048/diff/1/utils/ssh/ssh.go File utils/ssh/ssh.go (right): https://codereview.appspot.com/67820048/diff/1/utils/ssh/ssh.go#newcode72 utils/ssh/ssh.go:72: // Copy copies file(s) between ...
10 years, 2 months ago (2014-02-24 17:52:35 UTC) #3
axw
10 years, 2 months ago (2014-02-25 02:23:53 UTC) #4
Message was sent while issue was closed.
Thanks for the updates and improvements. Sorry for harping on, but there's still
a couple of issues.

https://codereview.appspot.com/67820048/diff/20001/cmd/juju/scp.go
File cmd/juju/scp.go (left):

https://codereview.appspot.com/67820048/diff/20001/cmd/juju/scp.go#oldcode83
cmd/juju/scp.go:83: if v := strings.SplitN(arg, ":", 2); len(v) > 1 {
I think the BUG was actually about this line. Say you do

    juju scp 0:/local/file [::1]:/tmp

Then the SplitN won't do the right thing.

https://codereview.appspot.com/67820048/diff/20001/cmd/juju/scp.go
File cmd/juju/scp.go (right):

https://codereview.appspot.com/67820048/diff/20001/cmd/juju/scp.go#newcode94
cmd/juju/scp.go:94: host = fmt.Sprintf(`\[%s\]`, host)
Escaping the square brackets here doesn't seem right. That should be up to the
client implementation.

https://codereview.appspot.com/67820048/diff/20001/cmd/juju/scp_test.go
File cmd/juju/scp_test.go (right):

https://codereview.appspot.com/67820048/diff/20001/cmd/juju/scp_test.go#newco...
cmd/juju/scp_test.go:40: []string{"0:foo", ".", "-rv -o SomeOption"},
This isn't really testing reality is it? Shouldn't that be "-rv", "-o",
"SomeOption"? Otherwise you're testing the equivalent of someone running, on the
command line:
    juju scp 0:foo . '-rv -o SomeOption'

If "-o" and "SomeOption" were separate args, as would be the norm, you'll see
the problem I mentioned.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b