...

Text file src/cmd/go/testdata/vcstest/hg/vgotest1.txt

Documentation: cmd/go/testdata/vcstest/hg

     1handle hg
     2
     3cd git
     4
     5env GIT_AUTHOR_NAME='Russ Cox'
     6env GIT_AUTHOR_EMAIL='rsc@golang.org'
     7env GIT_COMMITTER_NAME=$GIT_AUTHOR_NAME
     8env GIT_COMMITTER_EMAIL=$GIT_AUTHOR_EMAIL
     9
    10git init
    11
    12# 0
    13at 2018-02-19T17:21:09-05:00
    14git add LICENSE README.md
    15git commit -m 'initial commit'
    16git branch -m master
    17
    18# 1
    19git branch mybranch
    20git checkout mybranch
    21
    22at 2018-02-19T18:10:06-05:00
    23mkdir pkg
    24echo 'package p // pkg/p.go'
    25cp stdout pkg/p.go
    26git add pkg/p.go
    27git commit -m 'add pkg/p.go'
    28git tag v0.0.0
    29git tag v1.0.0
    30git tag v2.0.0
    31git tag mytag
    32
    33git branch v1
    34git branch v2
    35git checkout v2
    36
    37# 2
    38at 2018-02-19T18:14:23-05:00
    39mkdir v2
    40echo 'module "github.com/rsc/vgotest1/v2" // root go.mod'
    41cp stdout go.mod
    42git add go.mod
    43git commit -m 'go.mod v2'
    44git tag v2.0.1
    45
    46# 3
    47at 2018-02-19T18:15:11-05:00
    48mkdir submod/pkg
    49echo 'package p // submod/pkg/p.go'
    50cp stdout submod/pkg/p.go
    51git add submod/pkg/p.go
    52git commit -m 'submod/pkg/p.go'
    53git tag v2.0.2
    54
    55# 4
    56at 2018-02-19T18:16:04-05:00
    57echo 'module "github.com/rsc/vgotest" // v2/go.mod'
    58cp stdout v2/go.mod
    59git add v2/go.mod
    60git commit -m 'v2/go.mod: bad go.mod (no version)'
    61git tag v2.0.3
    62
    63# 5
    64at 2018-02-19T19:03:38-05:00
    65env GIT_AUTHOR_DATE=2018-02-19T18:16:38-05:00
    66echo 'module "github.com/rsc/vgotest1/v2" // v2/go.mod'
    67cp stdout v2/go.mod
    68git add v2/go.mod
    69git commit -m 'v2/go.mod: fix'
    70git tag v2.0.4
    71
    72# 6
    73at 2018-02-19T19:03:59-05:00
    74env GIT_AUTHOR_DATE=2018-02-19T18:17:02-05:00
    75echo 'module "github.com/rsc/vgotest1" // root go.mod'
    76cp stdout go.mod
    77git add go.mod
    78git commit -m 'go.mod: drop v2'
    79git tag v2.0.5
    80
    81git checkout v1
    82
    83# 7
    84at 2018-02-19T18:10:28-05:00
    85echo 'module "github.com/rsc/vgotest1" // root go.mod'
    86cp stdout go.mod
    87git add go.mod
    88git commit -m 'go.mod'
    89git tag v0.0.1
    90git tag v1.0.1
    91
    92# 8
    93at 2018-02-19T18:11:28-05:00
    94mkdir submod/pkg
    95echo 'package pkg // submod/pkg/p.go'
    96cp stdout submod/pkg/p.go
    97git add submod
    98git commit -m 'submod/pkg/p.go'
    99git tag v1.0.2
   100
   101# 9
   102at 2018-02-19T18:12:07-05:00
   103echo 'module "github.com/vgotest1/submod" // submod/go.mod'
   104cp stdout submod/go.mod
   105git add submod/go.mod
   106git commit -m 'submod/go.mod'
   107git tag v1.0.3
   108git tag submod/v1.0.4
   109
   110# 10
   111at 2018-02-19T18:12:59-05:00
   112git apply ../0001-submod-go.mod-add-require-vgotest1-v1.1.0.patch
   113git commit -a -m 'submod/go.mod: add require vgotest1 v1.1.0'
   114git tag submod/v1.0.5
   115
   116# 11
   117at 2018-02-19T18:13:36-05:00
   118git apply ../0002-go.mod-add-require-submod-v1.0.5.patch
   119git commit -a -m 'go.mod: add require submod v1.0.5'
   120git tag v1.1.0
   121
   122git checkout master
   123
   124# 12
   125at 2018-02-19T17:23:01-05:00
   126mkdir pkg
   127echo 'package pkg'
   128cp stdout pkg/p.go
   129git add pkg/p.go
   130git commit -m 'pkg: add'
   131
   132# 13
   133at 2018-02-19T17:30:23-05:00
   134env GIT_AUTHOR_DATE=2018-02-19T17:24:48-05:00
   135echo 'module "github.com/vgotest1/v2"'
   136cp stdout go.mod
   137git add go.mod
   138git commit -m 'add go.mod'
   139
   140# 14
   141at 2018-02-19T17:30:45-05:00
   142echo 'module "github.com/vgotest1"'
   143cp stdout go.mod
   144git add go.mod
   145git commit -m 'bad mod path'
   146
   147# 15
   148at 2018-02-19T17:31:34-05:00
   149mkdir v2
   150echo 'module "github.com/vgotest1/v2"'
   151cp stdout v2/go.mod
   152git add v2/go.mod
   153git commit -m 'add v2/go.mod'
   154
   155# 16
   156at 2018-02-19T17:32:37-05:00
   157echo 'module "github.com/vgotest1/v2"'
   158cp stdout go.mod
   159git add go.mod
   160git commit -m 'say v2 in root go.mod'
   161
   162# 17
   163at 2018-02-19T17:51:24-05:00
   164	# README.md at this commit lacked a trailing newline, so 'git apply' can't
   165	# seem to apply it correctly as a patch. Instead, we use 'unquote' to write
   166	# the exact contents.
   167unquote 'This is a test repo for versioned go.\nThere''s nothing useful here.\n\n	v0.0.0 - has pkg/p.go\n	v0.0.1 - has go.mod\n	\n	v1.0.0 - has pkg/p.go\n	v1.0.1 - has go.mod\n	v1.0.2 - has submod/pkg/p.go\n	v1.0.3 - has submod/go.mod\n	submod/v1.0.4 - same\n	submod/v1.0.5 - add requirement on v1.1.0\n	v1.1.0 - add requirement on submod/v1.0.5\n	\n	v2.0.0 - has pkg/p.go\n	v2.0.1 - has go.mod with v2 module path\n	v2.0.2 - has go.mod with v1 (no version) module path\n	v2.0.3 - has v2/go.mod with v2 module path\n	v2.0.5 - has go.mod AND v2/go.mod with v2 module path\n	'
   168cp stdout README.md
   169mkdir v2/pkg
   170echo 'package q'
   171cp stdout v2/pkg/q.go
   172git add README.md v2/pkg/q.go
   173git commit -m 'add q'
   174git tag v2.0.6
   175
   176cd ..
   177
   178hg init
   179hg convert ./git .
   180rm ./git
   181
   182# Note: commit #18 is an 'update tags' commit automatically generated by 'hg
   183# convert'. We have no control over its timestamp, so it and its descendent
   184# commit #19 both end up with unpredictable commit hashes.
   185#
   186# Fortunately, these commits don't seem to matter for the purpose of reproducing
   187# the final branches and heads from the original copy of this repo.
   188
   189# 19
   190hg update -C -r 18
   191hg tag --user 'Russ Cox <rsc@golang.org>' --date '2018-07-18T21:24:45-04:00' -m 'Removed tag v2.0.0' --remove v2.0.0
   192
   193# 20
   194hg branch default
   195hg update -C -r 1
   196echo 'v2'
   197cp stdout v2
   198hg add v2
   199hg commit --user 'Russ Cox <rsc@golang.org>' --date '2018-07-18T21:25:08-04:00' -m 'v2.0.0'
   200
   201# 21
   202hg tag --user 'Russ Cox <rsc@golang.org>' --date '2018-07-18T21:25:13-04:00' -r f0ababb31f75 -m 'Added tag v2.0.0 for changeset f0ababb31f75' v2.0.0
   203
   204# 22
   205hg tag --user 'Russ Cox <rsc@golang.org>' --date '2018-07-18T21:26:02-04:00' -m 'Removed tag v2.0.0' --remove v2.0.0
   206
   207# 23
   208hg update -C -r 1
   209echo 'v2'
   210cp stdout v2
   211hg add v2
   212hg commit --user 'Russ Cox <rsc@golang.org>' --date '2018-07-19T01:21:27+00:00' -m 'v2'
   213
   214# 24
   215hg tag --user 'Russ Cox <rsc@golang.org>' --date '2018-07-18T21:26:33-04:00' -m 'Added tag v2.0.0 for changeset 814fce58e83a' -r 814fce58e83a v2.0.0
   216
   217hg book --delete v1
   218hg book --delete v2
   219hg book --force -r 16 master
   220
   221hg log -G --debug
   222
   223hg tags
   224cmp stdout .hg-tags
   225hg branches
   226cmp stdout .hg-branches
   227hg bookmarks
   228cmp stdout .hg-bookmarks
   229
   230-- .hg-tags --
   231tip                               24:645b06ca536d
   232v2.0.0                            23:814fce58e83a
   233v2.0.6                            17:3d4b89a2d059
   234v1.1.0                            11:92c7eb888b4f
   235submod/v1.0.5                     10:f3f560a6065c
   236v1.0.3                             9:4e58084d459a
   237submod/v1.0.4                      9:4e58084d459a
   238v1.0.2                             8:3ccdce3897f9
   239v1.0.1                             7:7890ea771ced
   240v0.0.1                             7:7890ea771ced
   241v2.0.5                             6:879ea98f7743
   242v2.0.4                             5:bf6388016230
   243v2.0.3                             4:a9ad6d1d14eb
   244v2.0.2                             3:de3663002f0f
   245v2.0.1                             2:f1fc0f22021b
   246v1.0.0                             1:e125018e286a
   247v0.0.0                             1:e125018e286a
   248mytag                              1:e125018e286a
   249-- .hg-branches --
   250default                       24:645b06ca536d
   251-- .hg-bookmarks --
   252   master                    16:577bde103b24
   253   mybranch                  1:e125018e286a
   254-- git/LICENSE --
   255Copyright (c) 2009 The Go Authors. All rights reserved.
   256
   257Redistribution and use in source and binary forms, with or without
   258modification, are permitted provided that the following conditions are
   259met:
   260
   261   * Redistributions of source code must retain the above copyright
   262notice, this list of conditions and the following disclaimer.
   263   * Redistributions in binary form must reproduce the above
   264copyright notice, this list of conditions and the following disclaimer
   265in the documentation and/or other materials provided with the
   266distribution.
   267   * Neither the name of Google Inc. nor the names of its
   268contributors may be used to endorse or promote products derived from
   269this software without specific prior written permission.
   270
   271THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
   272"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
   273LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
   274A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
   275OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   276SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   277LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
   278DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
   279THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
   280(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
   281OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   282-- git/README.md --
   283This is a test repo for versioned go.
   284There's nothing useful here.
   285-- 0001-submod-go.mod-add-require-vgotest1-v1.1.0.patch --
   286From 70fd92eaa4dacf82548d0c6099f5b853ae2c1fc8 Mon Sep 17 00:00:00 2001
   287From: Russ Cox <rsc@golang.org>
   288Date: Mon, 19 Feb 2018 18:12:59 -0500
   289Subject: [PATCH] submod/go.mod: add require vgotest1 v1.1.0
   290
   291---
   292 submod/go.mod | 1 +
   293 1 file changed, 1 insertion(+)
   294
   295diff --git a/submod/go.mod b/submod/go.mod
   296index 7b18d93..c88de0f 100644
   297--- a/submod/go.mod
   298+++ b/submod/go.mod
   299@@ -1 +1,2 @@
   300 module "github.com/vgotest1/submod" // submod/go.mod
   301+require "github.com/vgotest1" v1.1.0
   302-- 
   3032.36.1.838.g23b219f8e3
   304-- 0002-go.mod-add-require-submod-v1.0.5.patch --
   305From b769f2de407a4db81af9c5de0a06016d60d2ea09 Mon Sep 17 00:00:00 2001
   306From: Russ Cox <rsc@golang.org>
   307Date: Mon, 19 Feb 2018 18:13:36 -0500
   308Subject: [PATCH] go.mod: add require submod v1.0.5
   309
   310---
   311 go.mod | 1 +
   312 1 file changed, 1 insertion(+)
   313
   314diff --git a/go.mod b/go.mod
   315index ac7a6d7..6118671 100644
   316--- a/go.mod
   317+++ b/go.mod
   318@@ -1 +1,2 @@
   319 module "github.com/rsc/vgotest1" // root go.mod
   320+require "github.com/rsc/vgotest1/submod" v1.0.5
   321-- 
   3222.36.1.838.g23b219f8e3

View as plain text