Skip to content

Commit

Permalink
Merged in f/extract (pull request #1)
Browse files Browse the repository at this point in the history
New surgical-extraction tool + initial source extract
  • Loading branch information
Maxim Kupriianov committed Mar 5, 2018
2 parents de92ff6 + 31f27e6 commit 4745f81
Show file tree
Hide file tree
Showing 3,079 changed files with 781,847 additions and 1,279 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
21 changes: 2 additions & 19 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,19 +1,2 @@
# ipfs can generate profiling dump files
*.cpuprof
*.memprof

*.swp
.ipfsconfig
*.out
*.coverprofile
*.test
*.orig
*~

coverage.txt
gx-workspace-update.json

.ipfs
bin/gx
bin/gx*
bin/tmp
.DS_Store
extraction.json
22 changes: 15 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
# General tools
all:

SHELL=PATH='$(PATH)' /bin/sh
link:
@if [ -d "$(GOPATH)/src/github.com/ipfs/go-ipfs" ]; then echo "github.com/ipfs/go-ipfs package exists in GOPATH"; exit 1; fi
ln -s $(shell pwd)/src $(GOPATH)/src/github.com/ipfs/go-ipfs

PROTOC = protoc --gogo_out=. --proto_path=.:/usr/local/opt/protobuf/include:$(dir $@) $<
extract:
# before must do: cd $$GOPATH/src/github.com/ipfs/go-ipfs && make install
#
surgical-extraction --pkg github.com/ipfs/go-ipfs/cmd/ipfswatch --out bitbucket.org/atlantproject/go-ipfs \
extract

extract-apply:
surgical-extraction --pkg github.com/ipfs/go-ipfs/cmd/ipfswatch --out bitbucket.org/atlantproject/go-ipfs \
extract --apply

# enable second expansion
.SECONDEXPANSION:

include Rules.mk
test:
go install bitbucket.org/atlantproject/go-ipfs/cmd/ipfswatch
10 changes: 5 additions & 5 deletions assets/assets.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import (
"os"
"path/filepath"

"github.com/ipfs/go-ipfs/core"
"github.com/ipfs/go-ipfs/core/coreunix"
uio "github.com/ipfs/go-ipfs/unixfs/io"
cid "gx/ipfs/QmcZfnkapfECQGcLZaf9B79NRg7cRa9EnZh4LSbkCzwNvY/go-cid"
"bitbucket.org/atlantproject/go-ipfs/core"
"bitbucket.org/atlantproject/go-ipfs/core/coreunix"
uio "bitbucket.org/atlantproject/go-ipfs/unixfs/io"
cid "unknown/go-cid"

// this import keeps gx from thinking the dep isn't used
_ "gx/ipfs/QmdZ4PvPHFQVLLEve7DgoKDcSY19wwpGBB1GKjjKi2rEL1/dir-index-html"
_ "unknown/dir-index-html"
)

// initDocPaths lists the paths for the docs we want to seed during --init
Expand Down
9 changes: 4 additions & 5 deletions blocks/blockstoreutil/remove.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ import (
"fmt"
"io"

"github.com/ipfs/go-ipfs/pin"

ds "gx/ipfs/QmPpegoMqhAEqjncrzArm7KVWAkCm78rqL2DPuNjhPrshg/go-datastore"
bs "gx/ipfs/QmTVDM4LCSUMFNQzbDLL9zQwp8usE6QHymFdh3h8vL9v6b/go-ipfs-blockstore"
cid "gx/ipfs/QmcZfnkapfECQGcLZaf9B79NRg7cRa9EnZh4LSbkCzwNvY/go-cid"
"bitbucket.org/atlantproject/go-ipfs/pin"
cid "unknown/go-cid"
ds "unknown/go-datastore"
bs "unknown/go-ipfs-blockstore"
)

// RemovedBlock is used to respresent the result of removing a block.
Expand Down
11 changes: 5 additions & 6 deletions blockservice/blockservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@ import (
"fmt"
"io"

exchange "github.com/ipfs/go-ipfs/exchange"

logging "gx/ipfs/QmRb5jh8z2E8hMGN2tkvs1yHynUanqnZ3UeKwgN1i9P1F8/go-log"
blockstore "gx/ipfs/QmTVDM4LCSUMFNQzbDLL9zQwp8usE6QHymFdh3h8vL9v6b/go-ipfs-blockstore"
cid "gx/ipfs/QmcZfnkapfECQGcLZaf9B79NRg7cRa9EnZh4LSbkCzwNvY/go-cid"
blocks "gx/ipfs/Qmej7nf81hi2x2tvjRBF3mcp74sQyuDH4VMYDGd1YtXjb2/go-block-format"
exchange "bitbucket.org/atlantproject/go-ipfs/exchange"
blocks "unknown/go-block-format"
cid "unknown/go-cid"
blockstore "unknown/go-ipfs-blockstore"
logging "unknown/go-log"
)

var log = logging.Logger("blockservice")
Expand Down
21 changes: 10 additions & 11 deletions cmd/ipfswatch/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,16 @@ import (
"path/filepath"
"syscall"

commands "github.com/ipfs/go-ipfs/commands"
core "github.com/ipfs/go-ipfs/core"
corehttp "github.com/ipfs/go-ipfs/core/corehttp"
coreunix "github.com/ipfs/go-ipfs/core/coreunix"
config "github.com/ipfs/go-ipfs/repo/config"
fsrepo "github.com/ipfs/go-ipfs/repo/fsrepo"

homedir "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/mitchellh/go-homedir"

process "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess"
fsnotify "gx/ipfs/QmczzCMvJ3HV57WBKDy8b4ucp7quT325JjDbixYRS5Pwvv/fsnotify.v1"
commands "bitbucket.org/atlantproject/go-ipfs/commands"
core "bitbucket.org/atlantproject/go-ipfs/core"
corehttp "bitbucket.org/atlantproject/go-ipfs/core/corehttp"
coreunix "bitbucket.org/atlantproject/go-ipfs/core/coreunix"
config "bitbucket.org/atlantproject/go-ipfs/repo/config"
fsrepo "bitbucket.org/atlantproject/go-ipfs/repo/fsrepo"
homedir "github.com/mitchellh/go-homedir"

fsnotify "unknown/fsnotify.v1"
process "unknown/goprocess"
)

var http = flag.Bool("http", false, "expose IPFS HTTP API")
Expand Down
9 changes: 4 additions & 5 deletions commands/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@ import (
"io"
"reflect"

"github.com/ipfs/go-ipfs/path"

logging "gx/ipfs/QmRb5jh8z2E8hMGN2tkvs1yHynUanqnZ3UeKwgN1i9P1F8/go-log"
cmds "gx/ipfs/QmabLouZTZwhfALuBcssPvkzhbYGMb4394huT7HY4LQ6d3/go-ipfs-cmds"
cmdkit "gx/ipfs/QmceUdzxkimdYsgtX733uNgzf1DLHyBKN6ehGSp85ayppM/go-ipfs-cmdkit"
"bitbucket.org/atlantproject/go-ipfs/path"
cmdkit "unknown/go-ipfs-cmdkit"
cmds "unknown/go-ipfs-cmds"
logging "unknown/go-log"
)

var log = logging.Logger("command")
Expand Down
6 changes: 3 additions & 3 deletions commands/legacy/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package legacy
import (
"io"

"gx/ipfs/QmabLouZTZwhfALuBcssPvkzhbYGMb4394huT7HY4LQ6d3/go-ipfs-cmds"
"unknown/go-ipfs-cmds"

oldcmds "github.com/ipfs/go-ipfs/commands"
logging "gx/ipfs/QmRb5jh8z2E8hMGN2tkvs1yHynUanqnZ3UeKwgN1i9P1F8/go-log"
oldcmds "bitbucket.org/atlantproject/go-ipfs/commands"
logging "unknown/go-log"
)

var log = logging.Logger("cmds/lgc")
Expand Down
4 changes: 2 additions & 2 deletions commands/legacy/legacy.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"io"
"runtime/debug"

"gx/ipfs/QmabLouZTZwhfALuBcssPvkzhbYGMb4394huT7HY4LQ6d3/go-ipfs-cmds"
"unknown/go-ipfs-cmds"

oldcmds "github.com/ipfs/go-ipfs/commands"
oldcmds "bitbucket.org/atlantproject/go-ipfs/commands"
)

// MarshalerEncoder implements Encoder from a Marshaler
Expand Down
8 changes: 4 additions & 4 deletions commands/legacy/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (
"os"
"reflect"

"gx/ipfs/QmabLouZTZwhfALuBcssPvkzhbYGMb4394huT7HY4LQ6d3/go-ipfs-cmds"
"gx/ipfs/QmceUdzxkimdYsgtX733uNgzf1DLHyBKN6ehGSp85ayppM/go-ipfs-cmdkit"
"gx/ipfs/QmceUdzxkimdYsgtX733uNgzf1DLHyBKN6ehGSp85ayppM/go-ipfs-cmdkit/files"
"unknown/go-ipfs-cmdkit"
"unknown/go-ipfs-cmdkit/files"
"unknown/go-ipfs-cmds"

oldcmds "github.com/ipfs/go-ipfs/commands"
oldcmds "bitbucket.org/atlantproject/go-ipfs/commands"
)

// requestWrapper implements a oldcmds.Request from an Request
Expand Down
6 changes: 3 additions & 3 deletions commands/legacy/response.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"reflect"
"sync"

"gx/ipfs/QmabLouZTZwhfALuBcssPvkzhbYGMb4394huT7HY4LQ6d3/go-ipfs-cmds"
"gx/ipfs/QmceUdzxkimdYsgtX733uNgzf1DLHyBKN6ehGSp85ayppM/go-ipfs-cmdkit"
"unknown/go-ipfs-cmdkit"
"unknown/go-ipfs-cmds"

oldcmds "github.com/ipfs/go-ipfs/commands"
oldcmds "bitbucket.org/atlantproject/go-ipfs/commands"
)

// responseWrapper wraps Response and implements olcdms.Response.
Expand Down
4 changes: 2 additions & 2 deletions commands/legacy/responseemitter.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"fmt"
"io"

"gx/ipfs/QmceUdzxkimdYsgtX733uNgzf1DLHyBKN6ehGSp85ayppM/go-ipfs-cmdkit"
"unknown/go-ipfs-cmdkit"

oldcmds "github.com/ipfs/go-ipfs/commands"
oldcmds "bitbucket.org/atlantproject/go-ipfs/commands"
)

// wrappedResponseEmitter implements a ResponseEmitter by forwarding everything to an oldcmds.Response
Expand Down
12 changes: 6 additions & 6 deletions commands/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ import (
"strings"
"time"

"github.com/ipfs/go-ipfs/core"
"github.com/ipfs/go-ipfs/repo/config"
u "gx/ipfs/QmNiJuT8Ja3hMVpBHXv3Q6dwmperaQ6JjLtpMQgMCD7xvx/go-ipfs-util"
"bitbucket.org/atlantproject/go-ipfs/core"
"bitbucket.org/atlantproject/go-ipfs/repo/config"
u "unknown/go-ipfs-util"

"gx/ipfs/QmabLouZTZwhfALuBcssPvkzhbYGMb4394huT7HY4LQ6d3/go-ipfs-cmds"
"gx/ipfs/QmceUdzxkimdYsgtX733uNgzf1DLHyBKN6ehGSp85ayppM/go-ipfs-cmdkit"
"gx/ipfs/QmceUdzxkimdYsgtX733uNgzf1DLHyBKN6ehGSp85ayppM/go-ipfs-cmdkit/files"
"unknown/go-ipfs-cmdkit"
"unknown/go-ipfs-cmdkit/files"
"unknown/go-ipfs-cmds"
)

type Context struct {
Expand Down
4 changes: 2 additions & 2 deletions commands/response.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"os"
"strings"

cmds "gx/ipfs/QmabLouZTZwhfALuBcssPvkzhbYGMb4394huT7HY4LQ6d3/go-ipfs-cmds"
cmdkit "gx/ipfs/QmceUdzxkimdYsgtX733uNgzf1DLHyBKN6ehGSp85ayppM/go-ipfs-cmdkit"
cmdkit "unknown/go-ipfs-cmdkit"
cmds "unknown/go-ipfs-cmds"
)

// ErrorType signfies a category of errors
Expand Down
22 changes: 11 additions & 11 deletions core/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ import (
"sync"
"time"

config "github.com/ipfs/go-ipfs/repo/config"
math2 "github.com/ipfs/go-ipfs/thirdparty/math2"
lgbl "gx/ipfs/Qmf9JgVLz46pxPXwG2eWSJpkqVCcjD4rp7zCRi2KP6GTNB/go-libp2p-loggables"

host "gx/ipfs/QmNmJZL7FQySMtE2BQuLMuZg2EB2CLEunJJUSVSc9YnnbV/go-libp2p-host"
goprocess "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess"
procctx "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess/context"
periodicproc "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess/periodic"
pstore "gx/ipfs/QmXauCuJzmzapetmC6W4TuDJLL1yFFrVzSHoWv8YdbmnxH/go-libp2p-peerstore"
inet "gx/ipfs/QmXfkENeeBvh3zYA51MaSdGUdBjhQ99cP5WQe8zgr6wchG/go-libp2p-net"
peer "gx/ipfs/QmZoWKhxUmZ2seW4BzX6fJkNR8hh9PsGModr7q171yq2SS/go-libp2p-peer"
config "bitbucket.org/atlantproject/go-ipfs/repo/config"
math2 "bitbucket.org/atlantproject/go-ipfs/thirdparty/math2"
lgbl "unknown/go-libp2p-loggables"

host "unknown/go-libp2p-host"
inet "unknown/go-libp2p-net"
peer "unknown/go-libp2p-peer"
pstore "unknown/go-libp2p-peerstore"
goprocess "unknown/goprocess"
procctx "unknown/goprocess/context"
periodicproc "unknown/goprocess/periodic"
)

// ErrNotEnoughBootstrapPeers signals that we do not have enough bootstrap
Expand Down
37 changes: 18 additions & 19 deletions core/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,24 @@ import (
"syscall"
"time"

bserv "github.com/ipfs/go-ipfs/blockservice"
offline "github.com/ipfs/go-ipfs/exchange/offline"
filestore "github.com/ipfs/go-ipfs/filestore"
dag "github.com/ipfs/go-ipfs/merkledag"
resolver "github.com/ipfs/go-ipfs/path/resolver"
pin "github.com/ipfs/go-ipfs/pin"
repo "github.com/ipfs/go-ipfs/repo"
cfg "github.com/ipfs/go-ipfs/repo/config"
uio "github.com/ipfs/go-ipfs/unixfs/io"

ds "gx/ipfs/QmPpegoMqhAEqjncrzArm7KVWAkCm78rqL2DPuNjhPrshg/go-datastore"
dsync "gx/ipfs/QmPpegoMqhAEqjncrzArm7KVWAkCm78rqL2DPuNjhPrshg/go-datastore/sync"
metrics "gx/ipfs/QmRg1gKTHzc3CZXSKzem8aR4E3TubFhbgXwfVuWnSK5CC5/go-metrics-interface"
goprocessctx "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess/context"
bstore "gx/ipfs/QmTVDM4LCSUMFNQzbDLL9zQwp8usE6QHymFdh3h8vL9v6b/go-ipfs-blockstore"
pstore "gx/ipfs/QmXauCuJzmzapetmC6W4TuDJLL1yFFrVzSHoWv8YdbmnxH/go-libp2p-peerstore"
peer "gx/ipfs/QmZoWKhxUmZ2seW4BzX6fJkNR8hh9PsGModr7q171yq2SS/go-libp2p-peer"
ci "gx/ipfs/QmaPbCnUMBohSGo3KnxEa2bHqyJVVeEEcwtqJAYxerieBo/go-libp2p-crypto"
retry "gx/ipfs/Qmc74pRHvndTDAB5nXztWAV7vs5j1obvCb9ejfQzXp9USX/retry-datastore"
bserv "bitbucket.org/atlantproject/go-ipfs/blockservice"
offline "bitbucket.org/atlantproject/go-ipfs/exchange/offline"
filestore "bitbucket.org/atlantproject/go-ipfs/filestore"
dag "bitbucket.org/atlantproject/go-ipfs/merkledag"
resolver "bitbucket.org/atlantproject/go-ipfs/path/resolver"
pin "bitbucket.org/atlantproject/go-ipfs/pin"
repo "bitbucket.org/atlantproject/go-ipfs/repo"
cfg "bitbucket.org/atlantproject/go-ipfs/repo/config"
uio "bitbucket.org/atlantproject/go-ipfs/unixfs/io"
ds "unknown/go-datastore"
dsync "unknown/go-datastore/sync"
bstore "unknown/go-ipfs-blockstore"
ci "unknown/go-libp2p-crypto"
peer "unknown/go-libp2p-peer"
pstore "unknown/go-libp2p-peerstore"
metrics "unknown/go-metrics-interface"
goprocessctx "unknown/goprocess/context"
retry "unknown/retry-datastore"
)

type BuildCfg struct {
Expand Down
7 changes: 3 additions & 4 deletions core/commands/active.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ import (
"text/tabwriter"
"time"

cmds "github.com/ipfs/go-ipfs/commands"
e "github.com/ipfs/go-ipfs/core/commands/e"

"gx/ipfs/QmceUdzxkimdYsgtX733uNgzf1DLHyBKN6ehGSp85ayppM/go-ipfs-cmdkit"
cmds "bitbucket.org/atlantproject/go-ipfs/commands"
e "bitbucket.org/atlantproject/go-ipfs/core/commands/e"
"unknown/go-ipfs-cmdkit"
)

var ActiveReqsCmd = &cmds.Command{
Expand Down
29 changes: 14 additions & 15 deletions core/commands/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,20 @@ import (
"os"
"strings"

blockservice "github.com/ipfs/go-ipfs/blockservice"
core "github.com/ipfs/go-ipfs/core"
"github.com/ipfs/go-ipfs/core/coreunix"
offline "github.com/ipfs/go-ipfs/exchange/offline"
dag "github.com/ipfs/go-ipfs/merkledag"
dagtest "github.com/ipfs/go-ipfs/merkledag/test"
mfs "github.com/ipfs/go-ipfs/mfs"
ft "github.com/ipfs/go-ipfs/unixfs"

bstore "gx/ipfs/QmTVDM4LCSUMFNQzbDLL9zQwp8usE6QHymFdh3h8vL9v6b/go-ipfs-blockstore"
mh "gx/ipfs/QmZyZDi491cCNTLfAhwcaDii2Kg4pwKRkhqQzURGDvY6ua/go-multihash"
cmds "gx/ipfs/QmabLouZTZwhfALuBcssPvkzhbYGMb4394huT7HY4LQ6d3/go-ipfs-cmds"
cmdkit "gx/ipfs/QmceUdzxkimdYsgtX733uNgzf1DLHyBKN6ehGSp85ayppM/go-ipfs-cmdkit"
files "gx/ipfs/QmceUdzxkimdYsgtX733uNgzf1DLHyBKN6ehGSp85ayppM/go-ipfs-cmdkit/files"
pb "gx/ipfs/QmeWjRodbcZFKe5tMN7poEx3izym6osrLSnTLf9UjJZBbs/pb"
blockservice "bitbucket.org/atlantproject/go-ipfs/blockservice"
core "bitbucket.org/atlantproject/go-ipfs/core"
"bitbucket.org/atlantproject/go-ipfs/core/coreunix"
offline "bitbucket.org/atlantproject/go-ipfs/exchange/offline"
dag "bitbucket.org/atlantproject/go-ipfs/merkledag"
dagtest "bitbucket.org/atlantproject/go-ipfs/merkledag/test"
mfs "bitbucket.org/atlantproject/go-ipfs/mfs"
ft "bitbucket.org/atlantproject/go-ipfs/unixfs"
bstore "unknown/go-ipfs-blockstore"
cmdkit "unknown/go-ipfs-cmdkit"
files "unknown/go-ipfs-cmdkit/files"
cmds "unknown/go-ipfs-cmds"
mh "unknown/go-multihash"
pb "unknown/pb"
)

// ErrDepthLimitExceeded indicates that the max depth has been exceded.
Expand Down
21 changes: 10 additions & 11 deletions core/commands/bitswap.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,16 @@ import (
"fmt"
"io"

oldcmds "github.com/ipfs/go-ipfs/commands"
lgc "github.com/ipfs/go-ipfs/commands/legacy"
e "github.com/ipfs/go-ipfs/core/commands/e"
bitswap "github.com/ipfs/go-ipfs/exchange/bitswap"
decision "github.com/ipfs/go-ipfs/exchange/bitswap/decision"

"gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize"
peer "gx/ipfs/QmZoWKhxUmZ2seW4BzX6fJkNR8hh9PsGModr7q171yq2SS/go-libp2p-peer"
cmds "gx/ipfs/QmabLouZTZwhfALuBcssPvkzhbYGMb4394huT7HY4LQ6d3/go-ipfs-cmds"
cid "gx/ipfs/QmcZfnkapfECQGcLZaf9B79NRg7cRa9EnZh4LSbkCzwNvY/go-cid"
cmdkit "gx/ipfs/QmceUdzxkimdYsgtX733uNgzf1DLHyBKN6ehGSp85ayppM/go-ipfs-cmdkit"
oldcmds "bitbucket.org/atlantproject/go-ipfs/commands"
lgc "bitbucket.org/atlantproject/go-ipfs/commands/legacy"
e "bitbucket.org/atlantproject/go-ipfs/core/commands/e"
bitswap "bitbucket.org/atlantproject/go-ipfs/exchange/bitswap"
decision "bitbucket.org/atlantproject/go-ipfs/exchange/bitswap/decision"
cid "unknown/go-cid"
"unknown/go-humanize"
cmdkit "unknown/go-ipfs-cmdkit"
cmds "unknown/go-ipfs-cmds"
peer "unknown/go-libp2p-peer"
)

var BitswapCmd = &cmds.Command{
Expand Down
Loading

0 comments on commit 4745f81

Please sign in to comment.