Keyboard Shortcuts

File
u :up to issue
m :publish + mail comments
M :edit review message
j / k :jump to file after / before current file
J / K :jump to next file with a comment after / before current file
Side-by-side diff
i :toggle intra-line diffs
e :expand all comments
c :collapse all comments
s :toggle showing all comments
n / p :next / previous diff chunk or comment
N / P :next / previous comment
<Up> / <Down> :next / previous line
<Enter> :respond to / edit current comment
d :mark current comment as done
Issue
u :up to list of issues
m :publish + mail comments
j / k :jump to patch after / before current patch
o / <Enter> :open current patch in side-by-side view
i :open current patch in unified diff view
Issue List
j / k :jump to issue after / before current issue
o / <Enter> :open current issue
# : close issue
Comment/message editing
<Ctrl> + s or <Ctrl> + Enter :save comment
<Esc> :cancel edit
Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(300)
Issues Repositories Search
Open Issues | Closed Issues | All Issues | Sign in with your Google Account to create issues and add comments

Issue 65460043: add PatchPath method

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 10 months ago by natefinch
Modified:
11 years, 10 months ago
Reviewers:
dimitern , mp+206984, rog
Visibility:
Public.
add PatchPath method This consolidates a bunch of spots in tests that all just watch to patch the $PATH (and were doing so in a non-portable way). https://code.launchpad.net/~natefinch/juju-core/035-pathlists/+merge/206984 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 6

Patch Set 2 : add PatchPath method #

Created: 11 years, 10 months ago
Download [raw] [tar.bz2]
Unified diffs Side-by-side diffs Delta from patch set Stats (+46 lines, -19 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/juju/ssh_test.go View 1 1 chunk +1 line, -1 line 0 comments Download
M environs/sshstorage/storage_test.go View 1 1 chunk +1 line, -2 lines 0 comments Download
M provider/local/environ_test.go View 1 2 chunks +1 line, -2 lines 0 comments Download
M state/apiserver/client/run_test.go View 1 2 chunks +1 line, -3 lines 0 comments Download
M testing/testbase/cleanup.go View 1 1 chunk +7 lines, -0 lines 0 comments Download
M testing/testbase/patch.go View 1 2 chunks +12 lines, -0 lines 0 comments Download
M testing/testbase/patch_test.go View 1 1 chunk +15 lines, -0 lines 0 comments Download
M upgrades/lockdirectory_test.go View 1 2 chunks +1 line, -2 lines 0 comments Download
M upstart/upstart_test.go View 1 1 chunk +1 line, -2 lines 0 comments Download
M utils/ssh/run_test.go View 1 2 chunks +1 line, -3 lines 0 comments Download
M utils/ssh/ssh_test.go View 1 1 chunk +1 line, -1 line 0 comments Download
M utils/ssh/testing/fakessh.go View 1 2 chunks +1 line, -2 lines 0 comments Download
M worker/uniter/debug/server_test.go View 1 1 chunk +1 line, -1 line 0 comments Download
Total messages: 4
|
natefinch
Please take a look.
11 years, 10 months ago (2014年02月18日 16:32:24 UTC) #1
Please take a look.
Sign in to reply to this message.
rog
LGTM except that I'd suggest a slightly more meaningful name, say PatchExecPath, because there are ...
11 years, 10 months ago (2014年02月18日 16:41:40 UTC) #2
LGTM except that I'd suggest a slightly more meaningful name,
say PatchExecPath, because there are many "paths" around the
place, and it's perhaps not always obvious when Path refers
to the shell's $PATH.
One other suggestion below.
https://codereview.appspot.com/65460043/diff/1/environs/sshstorage/storage_te...
File environs/sshstorage/storage_test.go (right):
https://codereview.appspot.com/65460043/diff/1/environs/sshstorage/storage_te...
environs/sshstorage/storage_test.go:65: restoreEnv := testbase.PatchPath(s.bin)
couldn't this just use s.PatchPath and lose the restoreEnv variable?
Sign in to reply to this message.
dimitern
LGTM with a few suggestions. https://codereview.appspot.com/65460043/diff/1/testing/testbase/patch.go File testing/testbase/patch.go (right): https://codereview.appspot.com/65460043/diff/1/testing/testbase/patch.go#newcode63 testing/testbase/patch.go:63: // PatchPath provides a ...
11 years, 10 months ago (2014年02月18日 16:45:38 UTC) #3
LGTM with a few suggestions.
https://codereview.appspot.com/65460043/diff/1/testing/testbase/patch.go
File testing/testbase/patch.go (right):
https://codereview.appspot.com/65460043/diff/1/testing/testbase/patch.go#newc...
testing/testbase/patch.go:63: // PatchPath provides a test a simple way to
prepend path to the start of
s/a test//
s/prepend path/prepend a path/
https://codereview.appspot.com/65460043/diff/1/testing/testbase/patch.go#newc...
testing/testbase/patch.go:64: // the environment's $PATH variable. A function is
returned that will return the
s/environment's $PATH variable/PATH environment variable/ ?
s/A function is returned that will return/Returns a function that restores the/
https://codereview.appspot.com/65460043/diff/1/testing/testbase/patch.go#newc...
testing/testbase/patch.go:66: func PatchPath(dir string) Restorer {
s/PatchPath/PrependPath/ perhaps, because it more obviously describes what
happens?
https://codereview.appspot.com/65460043/diff/1/testing/testbase/patch_test.go
File testing/testbase/patch_test.go (right):
https://codereview.appspot.com/65460043/diff/1/testing/testbase/patch_test.go...
testing/testbase/patch_test.go:89: 
d
https://codereview.appspot.com/65460043/diff/1/testing/testbase/patch_test.go...
testing/testbase/patch_test.go:93: 
expectPath := dir+string(os.PathListSeparator)+oldPath
c.Check(os.Getenv("PATH"), gc.Equals, expectPath)
?
Sign in to reply to this message.
natefinch
Please take a look.
11 years, 10 months ago (2014年02月18日 17:10:32 UTC) #4
Please take a look.
Sign in to reply to this message.
|
Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b

AltStyle によって変換されたページ (->オリジナル) /