@cryptotaxi247 / kubo / commits / b223dc2d0

fix vendoring problems from migrations

Juan Batiz-Benet committed Apr 21, 2015 at 23:56 UTC b223dc2d056c8b557430b176dd2458b1f2caa408
15 files changed +21 -147
Godeps/Godeps.json
-4
@@ -159,10 +159,6 @@
159 "ImportPath": "github.com/jbenet/go-logging",
160 "Rev": "74bec4b83f6d45d1402c1e9d94c0c29e39f6e0ea"
161 },
162 - {
163 - "ImportPath": "github.com/jbenet/go-migrate",
164 - "Rev": "593be6b4b24a87e4d380e54339721ad4b4c6543c"
165 - },
162 {
163 "ImportPath": "github.com/jbenet/go-msgio",
164 "Rev": "dbae89193876910c736b2ce1291fa8bbcf299d77"
Godeps/_workspace/src/github.com/jbenet/go-datastore/callback/callback.go
+2 -2
@@ -1,8 +1,8 @@
1 package callback
2
3 import (
4 - ds "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore"
5 - dsq "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore/query"
4 + ds "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore"
5 + dsq "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore/query"
6 )
7
8 type Datastore struct {
Godeps/_workspace/src/github.com/jbenet/go-datastore/coalesce/coalesce.go
+2 -2
@@ -3,8 +3,8 @@ package coalesce
3 import (
4 "sync"
5
6 - ds "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore"
7 - dsq "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore/query"
6 + ds "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore"
7 + dsq "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore/query"
8 )
9
10 var (
Godeps/_workspace/src/github.com/jbenet/go-datastore/coalesce/coalesce_test.go
+3 -3
@@ -6,9 +6,9 @@ import (
6 "testing"
7 "time"
8
9 - ds "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore"
10 - dscb "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore/callback"
11 - dssync "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore/sync"
9 + ds "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore"
10 + dscb "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore/callback"
11 + dssync "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore/sync"
12 )
13
14 type mock struct {
Godeps/_workspace/src/github.com/jbenet/go-datastore/flatfs/flatfs_test.go
+3 -3
@@ -6,9 +6,9 @@ import (
6 "path/filepath"
7 "testing"
8
9 - "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore"
10 - "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore/flatfs"
11 - "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore/query"
9 + "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore"
10 + "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore/flatfs"
11 + "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore/query"
12 )
13
14 func tempdir(t testing.TB) (path string, cleanup func()) {
Godeps/_workspace/src/github.com/jbenet/go-datastore/mount/mount_test.go
+3 -3
@@ -3,9 +3,9 @@ package mount_test
3 import (
4 "testing"
5
6 - "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore"
7 - "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore/mount"
8 - "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore/query"
6 + "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore"
7 + "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore/mount"
8 + "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore/query"
9 )
10
11 func TestPutBadNothing(t *testing.T) {
Godeps/_workspace/src/github.com/jbenet/go-datastore/tiered/tiered.go
+2 -2
@@ -4,8 +4,8 @@ import (
4 "fmt"
5 "sync"
6
7 - ds "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore"
8 - dsq "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore/query"
7 + ds "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore"
8 + dsq "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore/query"
9 )
10
11 type tiered []ds.Datastore
Godeps/_workspace/src/github.com/jbenet/go-datastore/tiered/tiered_test.go
+3 -3
@@ -3,9 +3,9 @@ package tiered
3 import (
4 "testing"
5
6 - ds "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore"
7 - dscb "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore/callback"
8 - dsq "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore/query"
6 + ds "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore"
7 + dscb "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore/callback"
8 + dsq "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore/query"
9 )
10
11 func testHas(t *testing.T, dses []ds.Datastore, k ds.Key, v interface{}) {
Godeps/_workspace/src/github.com/jbenet/go-datastore/timecache/timecache.go
+2 -2
@@ -4,8 +4,8 @@ import (
4 "sync"
5 "time"
6
7 - ds "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore"
8 - dsq "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore/query"
7 + ds "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore"
8 + dsq "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore/query"
9 )
10
11 var (
Godeps/_workspace/src/github.com/jbenet/go-datastore/timecache/timecache_test.go
+1 -1
@@ -4,7 +4,7 @@ import (
4 "testing"
5 "time"
6
7 - ds "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore"
7 + ds "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore"
8 )
9
10 func testHas(t *testing.T, d ds.Datastore, k ds.Key, v interface{}) {
Godeps/_workspace/src/github.com/jbenet/go-migrate/LICENSE deleted
-21
@@ -1,21 +0,0 @@
1 -The MIT License (MIT)
2 -
3 -Copyright (c) 2014 Juan Batiz-Benet
4 -
5 -Permission is hereby granted, free of charge, to any person obtaining a copy
6 -of this software and associated documentation files (the "Software"), to deal
7 -in the Software without restriction, including without limitation the rights
8 -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 -copies of the Software, and to permit persons to whom the Software is
10 -furnished to do so, subject to the following conditions:
11 -
12 -The above copyright notice and this permission notice shall be included in
13 -all copies or substantial portions of the Software.
14 -
15 -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 -THE SOFTWARE.
Godeps/_workspace/src/github.com/jbenet/go-migrate/README.md deleted
-11
@@ -1,11 +0,0 @@
1 -# go-migrate
2 -
3 -This is a very simple migration framework. See "Migrations" in https://github.com/jbenet/random-ideas/issues/33
4 -
5 -This package includes:
6 -
7 -- `migrate` package -- lib to write migration programs
8 -
9 -## The model
10 -
11 -The idea here is that we have some thing -- usually a directory -- that needs to be migrated between different representation versions. This may be because there has been an upgrade.
Godeps/_workspace/src/github.com/jbenet/go-migrate/cli.go deleted
-51
@@ -1,51 +0,0 @@
1 -package migrate
2 -
3 -import (
4 - "flag"
5 - "fmt"
6 - "os"
7 -)
8 -
9 -type Flags struct {
10 - Force bool
11 - Revert bool
12 - Path string // file path to migrate for fs based migrations
13 -}
14 -
15 -func (f *Flags) Setup() {
16 - flag.BoolVar(&f.Force, "f", false, "whether to force a migration (ignores warnings)")
17 - flag.BoolVar(&f.Revert, "revert", false, "whether to apply the migration backwards")
18 - flag.StringVar(&f.Path, "path", "", "file path to migrate for fs based migrations")
19 -}
20 -
21 -func (f *Flags) Parse() {
22 - flag.Parse()
23 -}
24 -
25 -func Run(m Migration) error {
26 - f := Flags{}
27 - f.Setup()
28 - f.Parse()
29 -
30 - if !m.Reversible() {
31 - if f.Revert {
32 - return fmt.Errorf("migration %d is irreversible", m.Versions())
33 - }
34 - if !f.Force {
35 - return fmt.Errorf("migration %d is irreversible (use -f to proceed)", m.Versions())
36 - }
37 - }
38 -
39 - if f.Revert {
40 - return m.Revert(Options{f})
41 - } else {
42 - return m.Apply(Options{f})
43 - }
44 -}
45 -
46 -func Main(m Migration) {
47 - if err := Run(m); err != nil {
48 - fmt.Fprintf(os.Stderr, "error: %s\n", err)
49 - os.Exit(1)
50 - }
51 -}
Godeps/_workspace/src/github.com/jbenet/go-migrate/doc.go deleted
-2
@@ -1,2 +0,0 @@
1 -// Package migrate is used to write migrations between representations of things.
2 -package migrate
Godeps/_workspace/src/github.com/jbenet/go-migrate/migrate.go deleted
-37
@@ -1,37 +0,0 @@
1 -package migrate
2 -
3 -import (
4 - "fmt"
5 -)
6 -
7 -// Options are migration options. For now all flags are options.
8 -type Options struct {
9 - Flags
10 -}
11 -
12 -// Migration represents
13 -type Migration interface {
14 -
15 - // Versions is the "v-to-v" version string.
16 - Versions() string
17 -
18 - // Reversible returns whether this migration can be reverted.
19 - // Endeavor to make them all reversible. This is here only to warn users
20 - // in case this is not the case.
21 - Reversible() bool
22 -
23 - // Apply applies the migration in question.
24 - Apply(Options) error
25 -
26 - // Revert un-applies the migration in question. This should be best-effort.
27 - // Some migrations are definitively one-way. If so, return an error.
28 - Revert(Options) error
29 -}
30 -
31 -func SplitVersion(s string) (from int, to int) {
32 - _, err := fmt.Scanf(s, "%d-to-%d", &from, &to)
33 - if err != nil {
34 - panic(err.Error())
35 - }
36 - return
37 -}