...

Text file src/cmd/go/testdata/script/reuse_hg_hellohash.txt

Documentation: cmd/go/testdata/script

     1[short] skip
     2[!exec:hg] skip
     3
     4env GO111MODULE=on
     5env GOPROXY=direct
     6env GOSUMDB=off
     7env GOMODCACHE=$WORK/modcache
     8
     9# go mod download hg/hello@hash needs to check RepoSum to find pseudoversion base,
    10# which does a refreshing hg pull.
    11go mod download -x -json vcs-test.golang.org/hg/hello.hg@e483a7d9f8c9
    12stderr 'hg( .*)* pull'
    13cp stdout hellohash.json
    14stdout '"Version": "v0.0.0-20170922011414-e483a7d9f8c9"'
    15stdout '"Query": "e483a7d9f8c9"'
    16stdout '"VCS": "hg"'
    17stdout '"URL": ".*/hg/hello"'
    18stdout '"Hash": "e483a7d9f8c9b4bc57430bdd8f81f0a65e4011c0"'
    19stdout '"RepoSum": "r1:blLvkhBriVMV[+]6Il4Ub43wlyWXIe1NpobTelF0peaG0="'
    20
    21# reuse go mod download vcstest/hello@hash
    22go clean -modcache
    23go mod download -reuse=hellohash.json -x -json vcs-test.golang.org/hg/hello.hg@e483a7d9f8c9
    24! stderr 'hg( .*)* pull'
    25stdout '"Reuse": true'
    26stdout '"Query": "e483a7d9f8c9"'
    27stdout '"Version": "v0.0.0-20170922011414-e483a7d9f8c9"'
    28stdout '"VCS": "hg"'
    29stdout '"URL": ".*/hg/hello"'
    30! stdout '"(TagPrefix|Ref)"'
    31stdout '"RepoSum": "r1:blLvkhBriVMV[+]6Il4Ub43wlyWXIe1NpobTelF0peaG0="'
    32stdout '"Hash": "e483a7d9f8c9b4bc57430bdd8f81f0a65e4011c0"'
    33! stdout '"(Dir|Info|GoMod|Zip)"'

View as plain text