https://codereview.appspot.com/8540050/diff/1/cmd/juju/upgradecharm.go#newcode38
cmd/juju/upgradecharm.go:38: Note that the given charm must be
compatible with the current one.
On 2013/04/25 14:43:52, rog wrote:
> Perhaps say what "compatible" means in this context in a concise and
easy to
> understand way (no need to go into all the details, but an overview
would be
> good so the user knows what they're up against)
and underscore that it's dangerous -- we can only check so much
compatibility :)
We have thus far gone with the shared agreement that if it works with
one repo (local), we can expect it to work with the other. Hmm, can we
now fake out the charm store? I think we can. If so, definite +1 on
testing this in a wider range of scenarios.
a few thoughts
https:/ /codereview. appspot. com/8540050/ diff/1/ cmd/juju/ upgradecharm. go upgradecharm. go (left):
File cmd/juju/
https:/ /codereview. appspot. com/8540050/ diff/1/ cmd/juju/ upgradecharm. go#oldcode67 upgradecharm. go:67: // TODO(dimitern): add the other flags
cmd/juju/
--switch and --revision.
I don't see an implementation of --revision, and I think it'd be quite
easy to sneak it into this CL ;)
(consider that --switch and --revision could in theory conflict, so it
might be good to barf here if they're both set)
https:/ /codereview. appspot. com/8540050/ diff/1/ cmd/juju/ upgradecharm. go upgradecharm. go (right):
File cmd/juju/
https:/ /codereview. appspot. com/8540050/ diff/1/ cmd/juju/ upgradecharm. go#newcode38 upgradecharm. go:38: Note that the given charm must be
cmd/juju/
compatible with the current one.
On 2013/04/25 14:43:52, rog wrote:
> Perhaps say what "compatible" means in this context in a concise and
easy to
> understand way (no need to go into all the details, but an overview
would be
> good so the user knows what they're up against)
and underscore that it's dangerous -- we can only check so much
compatibility :)
https:/ /codereview. appspot. com/8540050/ diff/1/ cmd/juju/ upgradecharm. go#newcode100 upgradecharm. go:100: curl, _ = service.CharmURL() on(-1)
cmd/juju/
wrt rog's comment below, curl = curl.WithRevisi
https:/ /codereview. appspot. com/8540050/ diff/1/ cmd/juju/ upgradecharm. go#newcode106 upgradecharm. go:106: rev, err := repo.Latest(curl)
cmd/juju/
On 2013/04/25 14:43:52, rog wrote:
> i think this is wrong in the context of SwitchURL.
> i think the Latest and bump-revision logic should only be triggered
when the
> charm url does not have a revision number specified.
+1
https:/ /codereview. appspot. com/8540050/ diff/1/ cmd/juju/ upgradecharm_ test.go upgradecharm_ test.go (right):
File cmd/juju/
https:/ /codereview. appspot. com/8540050/ diff/1/ cmd/juju/ upgradecharm_ test.go# newcode94 upgradecharm_ test.go: 94: func (s *UpgradeCharmSu ccessSuite)
cmd/juju/
assertUpgraded(c *C, revision int, forced bool, curl *charm.URL) {
I'd rather return the charm url and assert it in the places it's needed,
I think
https:/ /codereview. appspot. com/8540050/ diff/1/ cmd/juju/ upgradecharm_ test.go# newcode179 upgradecharm_ test.go: 179: s.assertLocalRe vision( c, 7,
cmd/juju/
myriakPath)
On 2013/04/25 14:43:52, rog wrote:
> also test switching from one cs: charm to another?
> and with a revision number explicitly specified.
We have thus far gone with the shared agreement that if it works with
one repo (local), we can expect it to work with the other. Hmm, can we
now fake out the charm store? I think we can. If so, definite +1 on
testing this in a wider range of scenarios.
https:/ /codereview. appspot. com/8540050/ diff/1/ testing/ charm.go
File testing/charm.go (right):
https:/ /codereview. appspot. com/8540050/ diff/1/ testing/ charm.go# newcode62 charm.go: 62: check(exec. Command( "mv", newDst, renamedDst).Run())
testing/
On 2013/04/25 14:43:52, rog wrote:
> os.Rename(newDst, renamedDst) ?
+1
https:/ /codereview. appspot. com/8540050/