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

Issue 12469044: init will write the environments.yaml by default. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 9 months ago by Michael Nelson
Modified:
10 years, 9 months ago
Reviewers:
dimitern, mp+178600, rog
Visibility:
Public.

Description

init will write the environments.yaml by default. Changes the behaviour of the command so that: 1. By default it will create the environments.yaml if it doesn't exist. 2. If environments.yaml already exists, it errors appropriately (with hint about -f) 3. If -f is provided, it will overwrite the existing environments.yaml 4. If --show is used, it will instead print the boilerplate to stdout. https://code.launchpad.net/~michael.nelson/juju-core/1208491-juju-init-w/+merge/178600 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 3

Patch Set 2 : init will write the environments.yaml by default. #

Total comments: 1

Patch Set 3 : init will write the environments.yaml by default. #

Total comments: 4

Patch Set 4 : init will write the environments.yaml by default. #

Total comments: 4

Patch Set 5 : init will write the environments.yaml by default. #

Total comments: 2

Patch Set 6 : init will write the environments.yaml by default. #

Patch Set 7 : init will write the environments.yaml by default. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+47 lines, -21 lines) Patch
A [revision details] View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/juju/init.go View 1 2 3 4 5 2 chunks +13 lines, -8 lines 0 comments Download
M cmd/juju/init_test.go View 1 2 3 4 4 chunks +32 lines, -13 lines 0 comments Download

Messages

Total messages: 13
Michael Nelson
Please take a look.
10 years, 9 months ago (2013-08-05 17:02:25 UTC) #1
dimitern
Nice, LGTM, just a few suggestions. https://codereview.appspot.com/12469044/diff/1/cmd/juju/init.go File cmd/juju/init.go (right): https://codereview.appspot.com/12469044/diff/1/cmd/juju/init.go#newcode29 cmd/juju/init.go:29: f.BoolVar(&c.WriteFile, "w", false, ...
10 years, 9 months ago (2013-08-05 17:18:09 UTC) #2
Michael Nelson
Please take a look.
10 years, 9 months ago (2013-08-05 17:52:07 UTC) #3
dimitern
Thanks! One more suggestion. Please, next time reply to the inline comments here on codereview.appspot.com, ...
10 years, 9 months ago (2013-08-05 18:30:26 UTC) #4
Michael Nelson
On Mon, Aug 5, 2013 at 7:30 PM, <dimiter.naydenov@canonical.com> wrote: > Thanks! One more suggestion. ...
10 years, 9 months ago (2013-08-05 18:42:53 UTC) #5
dimitern
> https://codereview.appspot.**com/12469044/diff/7001/cmd/**juju/init.go%3Chttps://codereview.appspot.com/12469044/diff/7001/cmd/juju/init.go> > > File cmd/juju/init.go (right): > > > > https://codereview.appspot.**com/12469044/diff/7001/cmd/** > > > ...
10 years, 9 months ago (2013-08-05 18:51:11 UTC) #6
Michael Nelson
Please take a look.
10 years, 9 months ago (2013-08-05 20:47:02 UTC) #7
rog
Looks good, but I've got a couple of suggestions that you might want to consider. ...
10 years, 9 months ago (2013-08-06 09:06:27 UTC) #8
Michael Nelson
Please take a look. https://codereview.appspot.com/12469044/diff/15001/cmd/juju/init.go File cmd/juju/init.go (left): https://codereview.appspot.com/12469044/diff/15001/cmd/juju/init.go#oldcode38 cmd/juju/init.go:38: fmt.Fprintln(out, config) On 2013/08/06 09:06:27, ...
10 years, 9 months ago (2013-08-06 10:24:06 UTC) #9
rog
https://codereview.appspot.com/12469044/diff/21001/cmd/juju/init.go File cmd/juju/init.go (right): https://codereview.appspot.com/12469044/diff/21001/cmd/juju/init.go#newcode30 cmd/juju/init.go:30: f.BoolVar(&c.WriteFile, "f", false, "overwrite existing environments.yaml file.") "force overwriting ...
10 years, 9 months ago (2013-08-06 10:31:30 UTC) #10
Michael Nelson
Please take a look. https://codereview.appspot.com/12469044/diff/21001/cmd/juju/init.go File cmd/juju/init.go (right): https://codereview.appspot.com/12469044/diff/21001/cmd/juju/init.go#newcode30 cmd/juju/init.go:30: f.BoolVar(&c.WriteFile, "f", false, "overwrite existing ...
10 years, 9 months ago (2013-08-06 10:44:10 UTC) #11
rog
LGTM with one tiny suggestion below. https://codereview.appspot.com/12469044/diff/26001/cmd/juju/init.go File cmd/juju/init.go (right): https://codereview.appspot.com/12469044/diff/26001/cmd/juju/init.go#newcode18 cmd/juju/init.go:18: ShowFile bool Perhaps ...
10 years, 9 months ago (2013-08-06 10:47:36 UTC) #12
Michael Nelson
10 years, 9 months ago (2013-08-06 10:57:44 UTC) #13
Please take a look.

https://codereview.appspot.com/12469044/diff/26001/cmd/juju/init.go
File cmd/juju/init.go (right):

https://codereview.appspot.com/12469044/diff/26001/cmd/juju/init.go#newcode18
cmd/juju/init.go:18: ShowFile  bool
On 2013/08/06 10:47:36, rog wrote:
> 
> Perhaps just "Show" might be more appropriate
> given its current semantics?

Done.
Sign in to reply to this message.

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