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

Issue 7370043: Change the way aliases to subcommands are handled.

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years ago by thumper2
Modified:
2 years, 3 months ago
Reviewers:
dimitern, dave, mp+149461, fwereade, rog
Visibility:
Public.

Description

Change the way aliases to subcommands are handled. The primary motivation for this change is to be able to list all the aliases for a command when asking for help on that command. This led to changes in the way the command aliases work, and where the aliases are stored. The commands now specify their own aliases rather than them being specified when the command is added to the super command. https://code.launchpad.net/~thumper/juju-core/command-aliases/+merge/149461 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 16

Patch Set 2 : Change the way aliases to subcommands are handled. #

Total comments: 11

Patch Set 3 : Change the way aliases to subcommands are handled. #

Patch Set 4 : Change the way aliases to subcommands are handled. #

Total comments: 7

Patch Set 5 : Change the way aliases to subcommands are handled. #

Patch Set 6 : Change the way aliases to subcommands are handled. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+231 lines, -95 lines) Patch
A [revision details] View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/cmd.go View 1 2 2 chunks +6 lines, -0 lines 0 comments Download
M cmd/juju/addrelation.go View 1 1 chunk +3 lines, -2 lines 0 comments Download
M cmd/juju/addunit.go View 1 1 chunk +4 lines, -1 line 0 comments Download
M cmd/juju/bootstrap.go View 1 2 3 4 2 chunks +5 lines, -2 lines 0 comments Download
M cmd/juju/constraints.go View 1 2 3 4 2 chunks +10 lines, -2 lines 0 comments Download
M cmd/juju/deploy.go View 1 1 chunk +4 lines, -1 line 0 comments Download
M cmd/juju/destroyenvironment.go View 1 1 chunk +2 lines, -3 lines 0 comments Download
M cmd/juju/destroymachine.go View 1 2 3 4 1 chunk +5 lines, -2 lines 0 comments Download
M cmd/juju/destroyrelation.go View 1 1 chunk +4 lines, -2 lines 0 comments Download
M cmd/juju/destroyservice.go View 1 1 chunk +4 lines, -2 lines 0 comments Download
M cmd/juju/destroyunit.go View 1 1 chunk +6 lines, -1 line 0 comments Download
M cmd/juju/expose.go View 1 1 chunk +5 lines, -1 line 0 comments Download
M cmd/juju/get.go View 1 2 3 4 1 chunk +5 lines, -1 line 0 comments Download
M cmd/juju/init.go View 1 2 3 4 1 chunk +11 lines, -7 lines 0 comments Download
M cmd/juju/init_test.go View 1 2 3 4 5 chunks +8 lines, -8 lines 0 comments Download
M cmd/juju/main.go View 1 2 3 4 2 chunks +4 lines, -4 lines 0 comments Download
M cmd/juju/main_test.go View 1 2 3 4 1 chunk +6 lines, -4 lines 0 comments Download
M cmd/juju/resolved.go View 1 1 chunk +5 lines, -1 line 0 comments Download
M cmd/juju/scp.go View 1 1 chunk +5 lines, -1 line 0 comments Download
M cmd/juju/set.go View 1 2 3 4 1 chunk +6 lines, -1 line 0 comments Download
M cmd/juju/ssh.go View 1 1 chunk +12 lines, -1 line 0 comments Download
M cmd/juju/status.go View 1 2 3 4 1 chunk +4 lines, -1 line 0 comments Download
M cmd/juju/unexpose.go View 1 1 chunk +5 lines, -1 line 0 comments Download
M cmd/juju/upgradejuju.go View 1 1 chunk +4 lines, -1 line 0 comments Download
M cmd/jujud/bootstrap.go View 1 2 3 4 1 chunk +4 lines, -1 line 0 comments Download
M cmd/jujud/machine.go View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download
M cmd/jujud/main_test.go View 1 1 chunk +4 lines, -1 line 0 comments Download
M cmd/jujud/unit.go View 1 1 chunk +4 lines, -1 line 0 comments Download
M cmd/jujud/version.go View 1 1 chunk +4 lines, -1 line 0 comments Download
M cmd/output_test.go View 1 1 chunk +6 lines, -1 line 0 comments Download
M cmd/supercommand.go View 1 2 3 3 chunks +18 lines, -20 lines 0 comments Download
M cmd/supercommand_test.go View 1 chunk +1 line, -1 line 0 comments Download
M cmd/util_test.go View 1 1 chunk +10 lines, -3 lines 0 comments Download
M environs/boilerplate_config.go View 1 chunk +2 lines, -2 lines 0 comments Download
M worker/uniter/jujuc/config-get.go View 1 1 chunk +4 lines, -3 lines 0 comments Download
M worker/uniter/jujuc/juju-log.go View 1 1 chunk +5 lines, -1 line 0 comments Download
M worker/uniter/jujuc/ports.go View 1 2 chunks +7 lines, -3 lines 0 comments Download
M worker/uniter/jujuc/relation-get.go View 1 1 chunk +4 lines, -1 line 0 comments Download
M worker/uniter/jujuc/relation-ids.go View 1 1 chunk +4 lines, -1 line 0 comments Download
M worker/uniter/jujuc/relation-list.go View 1 1 chunk +4 lines, -1 line 0 comments Download
M worker/uniter/jujuc/relation-set.go View 1 1 chunk +3 lines, -1 line 0 comments Download
M worker/uniter/jujuc/server_test.go View 1 1 chunk +5 lines, -1 line 0 comments Download
M worker/uniter/jujuc/unit-get.go View 1 1 chunk +3 lines, -1 line 0 comments Download

Messages

Total messages: 16
thumper2
Please take a look.
13 years ago (2013-02-20 04:13:44 UTC) #1
dave_cheney.net
One general comment. You can avoid the boilerplate of cmd.NewInfo(...) *Info by using a struct ...
13 years ago (2013-02-20 04:42:10 UTC) #2
dimitern
Overall LGTM, with some comments. https://codereview.appspot.com/7370043/diff/1/cmd/juju/generateconfig.go File cmd/juju/generateconfig.go (right): https://codereview.appspot.com/7370043/diff/1/cmd/juju/generateconfig.go#newcode17 cmd/juju/generateconfig.go:17: return cmd.NewInfo("init", "", "generate ...
13 years ago (2013-02-20 08:07:05 UTC) #3
dave_cheney.net
> https://codereview.appspot.com/7370043/diff/1/environs/boilerplate_config.go#newcode12 > environs/boilerplate_config.go:12: ## By default Juju ships AWS > (default), HP Cloud, OpenStack. ...
13 years ago (2013-02-20 09:39:07 UTC) #4
rog
On 2013/02/20 09:39:07, dfc wrote: > > > https://codereview.appspot.com/7370043/diff/1/environs/boilerplate_config.go#newcode12 > > environs/boilerplate_config.go:12: ## By default ...
13 years ago (2013-02-20 13:37:08 UTC) #5
rog
a few minor remarks below - LGTM with those addressed. https://codereview.appspot.com/7370043/diff/1/cmd/cmd.go File cmd/cmd.go (right): https://codereview.appspot.com/7370043/diff/1/cmd/cmd.go#newcode75 ...
13 years ago (2013-02-20 13:37:49 UTC) #6
fwereade
Nice change; LGTM assuming agreement with the below. https://codereview.appspot.com/7370043/diff/1/cmd/cmd.go File cmd/cmd.go (right): https://codereview.appspot.com/7370043/diff/1/cmd/cmd.go#newcode75 cmd/cmd.go:75: func ...
13 years ago (2013-02-20 15:54:30 UTC) #7
thumper2
So, lots of changes again, but this time mostly to the standard named field constructor ...
13 years ago (2013-02-20 22:28:24 UTC) #8
thumper2
Please take a look.
13 years ago (2013-02-20 22:29:39 UTC) #9
dave_cheney.net
LGTM. https://codereview.appspot.com/7370043/diff/3005/cmd/cmd.go File cmd/cmd.go (right): https://codereview.appspot.com/7370043/diff/3005/cmd/cmd.go#newcode69 cmd/cmd.go:69: // Aliases are other ways to call the ...
13 years ago (2013-02-21 01:35:12 UTC) #10
thumper2
https://codereview.appspot.com/7370043/diff/3005/cmd/cmd.go File cmd/cmd.go (right): https://codereview.appspot.com/7370043/diff/3005/cmd/cmd.go#newcode69 cmd/cmd.go:69: // Aliases are other ways to call the Command. ...
13 years ago (2013-02-21 01:57:45 UTC) #11
dave_cheney.net
You've got more than enough LGTMs, commit that sukka. https://codereview.appspot.com/7370043/diff/3005/cmd/juju/ssh.go File cmd/juju/ssh.go (right): https://codereview.appspot.com/7370043/diff/3005/cmd/juju/ssh.go#newcode27 cmd/juju/ssh.go:27: ...
13 years ago (2013-02-21 02:01:14 UTC) #12
thumper2
Please take a look.
13 years ago (2013-02-21 02:30:33 UTC) #13
fwereade
LGTM, just trivials https://codereview.appspot.com/7370043/diff/3007/cmd/juju/bootstrap.go File cmd/juju/bootstrap.go (right): https://codereview.appspot.com/7370043/diff/3007/cmd/juju/bootstrap.go#newcode48 cmd/juju/bootstrap.go:48: fmt.Fprintln(out, " juju generate-config -w") juju ...
13 years ago (2013-02-22 09:32:19 UTC) #14
thumper2
Please take a look.
13 years ago (2013-02-24 22:34:11 UTC) #15
thumper2
13 years ago (2013-02-24 22:41:50 UTC) #16
*** Submitted:

Change the way aliases to subcommands are handled.

The primary motivation for this change is to be able to list all the
aliases for a command when asking for help on that command.

This led to changes in the way the command aliases work, and where the aliases
are stored.  The commands now specify their own aliases rather than them being
specified when the command is added to the super command.

R=dfc, dimitern, rog, fwereade
CC=
https://codereview.appspot.com/7370043
Sign in to reply to this message.

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