Merge lp://staging/~niemeyer/juju-core/publish-command into lp://staging/~juju/juju-core/trunk
- publish-command
- Merge into trunk
Status: | Merged |
---|---|
Merged at revision: | 1131 |
Proposed branch: | lp://staging/~niemeyer/juju-core/publish-command |
Merge into: | lp://staging/~juju/juju-core/trunk |
Prerequisite: | lp://staging/~niemeyer/juju-core/branch-urls |
Diff against target: |
879 lines (+655/-14) (has conflicts) 11 files modified
bzr/bzr.go (+30/-1) bzr/bzr_test.go (+13/-0) charm/repo.go (+8/-5) charm/repo_test.go (+2/-1) charm/url.go (+6/-0) charm/url_test.go (+28/-0) cmd/juju/main.go (+8/-5) cmd/juju/main_test.go (+1/-0) cmd/juju/publish.go (+178/-0) cmd/juju/publish_test.go (+370/-0) testing/cmd.go (+11/-2) Text conflict in charm/url_test.go |
To merge this branch: | bzr merge lp://staging/~niemeyer/juju-core/publish-command |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Engineering | Pending | ||
Review via email: mp+157460@code.staging.launchpad.net |
Commit message
Description of the change
cmd/juju: add publish command!
Gustavo Niemeyer (niemeyer) wrote : | # |
William Reade (fwereade) wrote : | # |
A few comments/
https:/
File bzr/bzr.go (right):
https:/
bzr/bzr.go:140: if bytes.Count(stdout, []byte{'\n'}) == 1 &&
bytes.Contains(
Hmm... if we're depending on output strings, we should probably be
running all the commands in an env with LC_ALL set.
https:/
File cmd/juju/main.go (right):
https:/
cmd/juju/
Ha, yeah... the fact that we're "Register"ing things is pretty clear ;).
https:/
File cmd/juju/publish.go (right):
https:/
cmd/juju/
store",
I presume there'll be some way to publish from a particular dir other
that $PWD sometime? How do you expect that to look? I'd kinda like
"[<path to charm> [<charm url>]]" args to work but that might get fiddly
-- it's just a suggestion.
And `--from /path/to/charm` or similar would be fine, I think.
https:/
cmd/juju/
have *URLs*, branches have *locations*.
Very helpful, thank you.
https:/
cmd/juju/
Please run paths through ctx.AbsPath before use. (might simplify testing
a little, too)
https:/
cmd/juju/
I *think* it does that already, doesn't it? It'll dumbly poke in the
supplied series if required, and then try to parse what it ended up
with, and find that's not valid. The error will not be helpful, though,
and that behaviour is not tested AFAICS.
Possible suggestion: grab environs/
(and tweak docs to say something like "the following forms will be
accepted and inferred to refer to series %q"?)
Gustavo Niemeyer (niemeyer) wrote : | # |
https:/
File bzr/bzr.go (right):
https:/
bzr/bzr.go:140: if bytes.Count(stdout, []byte{'\n'}) == 1 &&
bytes.Contains(
On 2013/04/05 21:56:53, fwereade wrote:
> Hmm... if we're depending on output strings, we should probably be
running all
> the commands in an env with LC_ALL set.
Good point. Will do.
https:/
File cmd/juju/publish.go (right):
https:/
cmd/juju/
store",
On 2013/04/05 21:56:53, fwereade wrote:
> And `--from /path/to/charm` or similar would be fine, I think.
Sounds good.
https:/
cmd/juju/
On 2013/04/05 21:56:53, fwereade wrote:
> Please run paths through ctx.AbsPath before use. (might simplify
testing a
> little, too)
Sounds good.
https:/
cmd/juju/
On 2013/04/05 21:56:53, fwereade wrote:
> I *think* it does that already, doesn't it? It'll dumbly poke in the
supplied
> series if required, and then try to parse what it ended up with, and
find that's
> not valid. The error will not be helpful, though, and that behaviour
is not
> tested AFAICS.
> Possible suggestion: grab environs/
here (and
> tweak docs to say something like "the following forms will be accepted
and
> inferred to refer to series %q"?)
We don't have a config here. I think I'd rather preserve this here for
now, including the TODO, if that's okay. It works well for the moment.
Gustavo Niemeyer (niemeyer) wrote : | # |
Please take a look.
William Reade (fwereade) wrote : | # |
LGTM, just one point to clear up.
https:/
File cmd/juju/publish.go (right):
https:/
cmd/juju/
This documentation is now inaccurate, because there's never a default
series and never any inference. The config.
referred is a package var (const maybe, I forget); it would let you (1)
infer series, and (2) accurately document what series would be inferred.
I'm fine with the simpler behaviour as currently implemented if this is
fixed though.
Gustavo Niemeyer (niemeyer) wrote : | # |
https:/
File cmd/juju/publish.go (right):
https:/
cmd/juju/
On 2013/04/09 11:30:43, fwereade wrote:
> This documentation is now inaccurate, because there's never a default
series and
Good catch, thanks.
> never any inference. The config.
package
> var (const maybe, I forget); it would let you (1) infer series, and
(2)
> accurately document what series would be inferred.
I see. I think this is bogus, though, because it's hardcoded. It means
pushing to "mysql" today can mean something totally different than
pushing to "mysql" tomorrow, just because I upgraded the code.
I'd suggest thinking carefully about where this is being used nowadays.
> I'm fine with the simpler behaviour as currently implemented if this
is fixed
> though.
Sounds good, thanks.
Gustavo Niemeyer (niemeyer) wrote : | # |
Please take a look.
Dimiter Naydenov (dimitern) wrote : | # |
LGTM with a bunch of trivials.
https:/
File bzr/bzr.go (right):
https:/
bzr/bzr.go:32: func cenv() []string {
i'm not too keen on ultra short names, perhaps copyEnv at least?
https:/
bzr/bzr.go:149: func (b *Branch) MustBeClean() error {
"Must" in other parts implies a panic, so maybe "EnsureClean"?
https:/
File cmd/juju/main.go (right):
https:/
cmd/juju/
shouldn't this be in Common commands instead? It doesn't seem worth
having a group with a single command in it. Will there be other charm
publishing commands?
https:/
File cmd/juju/publish.go (right):
https:/
cmd/juju/
cannot infer from current directory (no push location)")
I think we use lowercase url for errors/logs, but YMMV
https:/
cmd/juju/
badge; see below
https:/
cmd/juju/
probably it's worth having charm.IsNotFound() helper for this.
https:/
cmd/juju/
curl)
badge; see below
https:/
cmd/juju/
store...")
cmd/juju: ... ? until we remove all log badges i think it's better to
keep them the everywhere.
https:/
File cmd/juju/
https:/
cmd/juju/
see below
https:/
cmd/juju/
see below
https:/
cmd/juju/
less cryptic - 1 * time.XX?
Gustavo Niemeyer (niemeyer) wrote : | # |
*** Submitted:
cmd/juju: add publish command!
R=fwereade, dimitern
CC=
https:/
https:/
File bzr/bzr.go (right):
https:/
bzr/bzr.go:32: func cenv() []string {
On 2013/04/09 15:29:04, dimitern wrote:
> i'm not too keen on ultra short names, perhaps copyEnv at least?
It's a well-documented private function used a single time 10 lines
above, so if you don't mind I'll keep the current name on the basis of
it being a matter of taste only.
https:/
bzr/bzr.go:149: func (b *Branch) MustBeClean() error {
On 2013/04/09 15:29:04, dimitern wrote:
> "Must" in other parts implies a panic, so maybe "EnsureClean"?
Sure. I'll go with CheckClean.
https:/
File cmd/juju/main.go (right):
https:/
cmd/juju/
On 2013/04/09 15:29:04, dimitern wrote:
> shouldn't this be in Common commands instead? It doesn't seem worth
having a
> group with a single command in it. Will there be other charm
publishing
> commands?
Yes, source.
https:/
File cmd/juju/publish.go (right):
https:/
cmd/juju/
cannot infer from current directory (no push location)")
On 2013/04/09 15:29:04, dimitern wrote:
> I think we use lowercase url for errors/logs, but YMMV
http://
https:/
cmd/juju/
On 2013/04/09 15:29:04, dimitern wrote:
> badge; see below
Done.
https:/
cmd/juju/
On 2013/04/09 15:29:04, dimitern wrote:
> probably it's worth having charm.IsNotFound() helper for this.
I don't feel the need, but feel free to propose a change.
https:/
cmd/juju/
curl)
On 2013/04/09 15:29:04, dimitern wrote:
> badge; see below
Done.
https:/
cmd/juju/
store...")
On 2013/04/09 15:29:04, dimitern wrote:
> cmd/juju: ... ? until we remove all log badges i think it's better to
keep them
> the everywhere.
Done.
https:/
File cmd/juju/
https:/
cmd/juju/
On 2013/04/09 15:29:04, dimitern wrote:
> see below
Done.
https:/
Reviewers: mp+157460_ code.launchpad. net,
Message:
Please take a look.
Description:
cmd/juju: add publish command!
https:/ /code.launchpad .net/~niemeyer/ juju-core/ publish- command/ +merge/ 157460
Requires: /code.launchpad .net/~niemeyer/ juju-core/ branch- urls/+merge/ 157098
https:/
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/8250045/
Affected files: publish_ test.go
A [revision details]
M bzr/bzr.go
M bzr/bzr_test.go
M charm/repo.go
M charm/repo_test.go
M cmd/juju/main.go
A cmd/juju/publish.go
A cmd/juju/