Allow V3 charm urls in tags #74

Merged
merged 1 commit into from Sep 20, 2016

Conversation

Projects
None yet
3 participants
Member

babbageclunk commented Sep 20, 2016

Previously charm urls needed to have the format:
cs:~user/series/name-revision

Now they can also have the format:
cs:user/name/series/revision

The old form is still accepted for backwards compatibility reasons.

Part of http://pad.lv/1584193

A couple of minor comments about the test comments, but nothing to block the change. lgtm.

@@ -17,6 +17,7 @@ type charmSuite struct{}
var _ = gc.Suite(&charmSuite{})
var validCharmURLs = []string{"charm",
+ // Old-style charm urls.
@macgreagoir

macgreagoir Sep 20, 2016

Contributor

These are V1, is that right? If so, maybe we should note them as such here for future clarity.

@babbageclunk

babbageclunk Sep 20, 2016

Member

Good points, thanks! I've been annoyed by references to the "old" and "new" formats in other charm url code, so it'd be good not to make the same mistake here. :)

@@ -37,6 +39,25 @@ var validCharmURLs = []string{"charm",
"charm-1",
"series/charm",
"series/charm-1",
+
+ // New-style charm urls.
@macgreagoir

macgreagoir Sep 20, 2016

Contributor

Same as "Old-style", probably good to also note "New-style" as V3 here. Nothing is new for long :-)

Member

babbageclunk commented Sep 20, 2016

$$merge$$

Contributor

jujubot commented Sep 20, 2016

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju-names

@jujubot jujubot merged commit 5b44e2c into juju:v2 Sep 20, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment