| 1 |
env GO111MODULE=on |
| 2 |
|
| 3 |
[!exec:hg] skip |
| 4 |
[short] skip |
| 5 |
|
| 6 |
# Testing hg->module converter's generation of +incompatible tags; turn off proxy. |
| 7 |
env GOPROXY=direct |
| 8 |
env GOSUMDB=off |
| 9 |
|
| 10 |
# get default |
| 11 |
go get vcs-test.golang.org/hg/legacytest.hg@default |
| 12 |
go list -m all |
| 13 |
stdout '^vcs-test.golang.org/hg/legacytest.hg v1\.2\.1-0\.20180717164942-2840708d1294$' |
| 14 |
|
| 15 |
# get should include incompatible tags in "latest" calculation. |
| 16 |
go mod edit -droprequire vcs-test.golang.org/hg/legacytest.hg |
| 17 |
go get vcs-test.golang.org/hg/legacytest.hg@latest |
| 18 |
go list |
| 19 |
go list -m all |
| 20 |
stdout '^vcs-test.golang.org/hg/legacytest.hg v2\.0\.0\+incompatible$' |
| 21 |
|
| 22 |
# v2.0.1-0.pseudo+incompatible |
| 23 |
go get ...test.hg@d6ad6040 |
| 24 |
go list -m all |
| 25 |
stdout '^vcs-test.golang.org/hg/legacytest.hg v2\.0\.1-0\.\d{14}-d6ad604046f6\+incompatible$' |
| 26 |
|
| 27 |
# v2.0.0+incompatible by tag+incompatible |
| 28 |
go get [email protected]+incompatible |
| 29 |
go list -m all |
| 30 |
stdout '^vcs-test.golang.org/hg/legacytest.hg v2\.0\.0\+incompatible$' |
| 31 |
|
| 32 |
# v2.0.0+incompatible by tag |
| 33 |
go get [email protected] |
| 34 |
go list -m all |
| 35 |
stdout '^vcs-test.golang.org/hg/legacytest.hg v2\.0\.0\+incompatible$' |
| 36 |
|
| 37 |
# v2.0.0+incompatible by hash (back on master) |
| 38 |
go get ...test.hg@e64782f |
| 39 |
go list -m all |
| 40 |
stdout '^vcs-test.golang.org/hg/legacytest.hg v2\.0\.0\+incompatible$' |
| 41 |
|
| 42 |
# v1.2.1-0.pseudo |
| 43 |
go get ...test.hg@ed9a22e |
| 44 |
go list -m all |
| 45 |
stdout '^vcs-test.golang.org/hg/legacytest.hg v1\.2\.1-0\.\d{14}-ed9a22ebb8a1$' |
| 46 |
|
| 47 |
# v1.2.0 |
| 48 |
go get ...test.hg@07462d |
| 49 |
go list -m all |
| 50 |
stdout '^vcs-test.golang.org/hg/legacytest.hg v1\.2\.0$' |
| 51 |
|
| 52 |
# v1.1.0-pre.0.pseudo |
| 53 |
go get ...test.hg@accb16 |
| 54 |
go list -m all |
| 55 |
stdout '^vcs-test.golang.org/hg/legacytest.hg v1\.1\.0-pre\.0\.\d{14}-accb169a3696$' |
| 56 |
|
| 57 |
# v1.1.0-pre (no longer on master) |
| 58 |
go get ...test.hg@90da67a9 |
| 59 |
go list -m all |
| 60 |
stdout '^vcs-test.golang.org/hg/legacytest.hg v1\.1\.0-pre$' |
| 61 |
|
| 62 |
# v1.0.1-0.pseudo |
| 63 |
go get ...test.hg@c6260a |
| 64 |
go list -m all |
| 65 |
stdout '^vcs-test.golang.org/hg/legacytest.hg v1\.0\.1-0\.\d{14}-c6260ab8dc3e$' |
| 66 |
|
| 67 |
# v1.0.0 |
| 68 |
go get ...test.hg@d6ad17 |
| 69 |
go list -m all |
| 70 |
stdout '^vcs-test.golang.org/hg/legacytest.hg v1\.0\.0$' |
| 71 |
|
| 72 |
# v0.0.0-pseudo |
| 73 |
go get ...test.hg@ee0106d |
| 74 |
go list -m all |
| 75 |
stdout '^vcs-test.golang.org/hg/legacytest.hg v0\.0\.0-\d{14}-ee0106da3c7c$' |
| 76 |
|
| 77 |
-- go.mod -- |
| 78 |
module x |
| 79 |
-- x.go -- |
| 80 |
package x |
| 81 |
import "vcs-test.golang.org/hg/legacytest.hg" |