1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-08-02 17:22:42 +08:00

90 Commits

Author SHA1 Message Date
5141fb0c8a fix import path of generated proto files
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-09-03 12:54:10 -07:00
56f01e4981 rm panic
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-09-02 11:03:07 -07:00
9bbd9b061d give ipfs get symlink support
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-08-30 23:34:02 -07:00
d993bc04d6 implement symlinks in unixfs, first draft
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-08-30 13:33:42 -07:00
rht
de5c0ceff0 Localize the scope of context.WithCancel for every DAG.Get
Instead put it inside of DAG.Get.
The fix is applied only in the case when the context.WithCancel
before a DAG.Get is also used later on in the scope.

License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-08-23 22:38:04 +07:00
rht
34e06f6c95 Wire a context down to (n *helpers.UnixfsNode) GetChild
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-08-23 19:35:03 +07:00
rht
5d8e15042f Replace WithTimeout with WithCancel whenever possible
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-08-23 19:35:03 +07:00
rht
d32177cda0 Make sure ctx in commands are derived from req.Context
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-08-23 19:35:03 +07:00
rht
9f0c8134cb Decompose DagArchive from unixfs tar
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-08-20 14:56:07 +07:00
rht
dfa0351df9 Refactor ipfs get
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-08-20 14:56:07 +07:00
f209763357 blockservice.New doesnt need to return an error
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-08-14 16:25:51 -07:00
39a23392c1 use rabin fingerprinting for a chunker
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

implement rabin fingerprinting as a chunker for ipfs

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

vendor correctly

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

refactor chunking interface a little

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

work chunking interface changes up into importer

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

move chunker type parsing into its own file in chunk

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-08-08 15:33:10 -07:00
f105ce439f get: fix bug + improvements
up until now there has been a very annoying bug with get, we would
get halting behavior. I'm not 100% sure this commit fixes it,
but it should. It certainly fixes others found in the process of
digging into the get / tar extractor code. (wish we could repro
the bug reliably enough to make a test case).

This is a much cleaner tar writer. the ad-hoc, error-prone synch
for the tar reader is gone (with i believe was incorrect). it is
replaced with a simple pipe and bufio. The tar logic is now in
tar.Writer, which writes unixfs dag nodes into a tar archive (no
need for synch here). And get's reader is constructed with DagArchive
which sets up the pipe + bufio.

NOTE: this commit also changes this behavior of `get`:
When retrieving a single file, if the file exists, get would fail.
this emulated the behavior of wget by default, which (without opts)
does not overwrite if the file is there. This change makes get
fail if the file is available locally. This seems more intuitive to
me as expected from a unix tool-- though perhaps it should be
discussed more before adopting.

Everything seems to work fine, and i have not been able to reproduce
the get halt bug.

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-08-05 09:50:33 +02:00
b858928662 unixfs/tar: cleaned up reader code
License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-08-05 09:46:58 +02:00
e3c35d8b76 cmds/get: fix context timeout problem
Get had a random timeout of 60s. This commit fixes that, wiring
up our contexts correctly.

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-07-24 14:43:17 -07:00
ef294431d4 move util.Key into its own package under blocks 2015-06-01 16:10:08 -07:00
b660f937bd make callback take a node instead of a key 2015-05-28 08:52:20 -07:00
dd928a2b1d change pinning to happen in a callback 2015-05-28 08:52:20 -07:00
rht
ac7edddb94 Run 'gofmt -s -w' on these files 2015-05-19 06:11:15 +07:00
87ce7abe47 unixfs/io: added NewEmptyDirectory()
some golinting along the way
2015-05-10 07:36:28 -04:00
5fff7742f3 godeps: move (go)goprotobuf to github location 2015-04-28 13:42:22 +02:00
31ff954539 Move IPNS resolutions into the core library
Move IPNS resolutions into the core library via the pathresolver.go
file. Fix the CLI commands to leverage this core component.
2015-04-20 01:04:30 -07:00
0a6b880bee fix for #1008 and other pinning fixes
This commit adds a new set of sharness tests for pinning, and addresses
bugs that were pointed out by said tests.

test/sharness: added more pinning tests

Pinning is currently broken. See issue #1051. This commit introduces
a few more pinning tests. These are by no means exhaustive, but
definitely surface the present problems going on. I believe these
tests are correct, but not sure. Pushing them as failing so that
pinning is fixed in this PR.

make pinning and merkledag.Get take contexts

improve 'add' commands usage of pinning

FIXUP: fix 'pin lists look good'

ipfs-pin-stat simple script to help check pinning

This is a simple shell script to help check pinning.

We ought to strive towards making adding commands this easy.
The http api is great and powerful, but our setup right now
gets in the way. Perhaps we can clean up that area.

updated t0081-repo-pinning

- fixed a couple bugs with the tests
- made it a bit clearer (still a lot going on)
- the remaining tests are correct and highlight a problem with
  pinning. Namely, that recursive pinning is buggy. At least:
  towards the end of the test, $HASH_DIR4 and $HASH_FILE4 should
  be pinned indirectly, but they're not. And thus get gc-ed out.
  There may be other problems too.

cc @whyrusleeping

fix grep params for context deadline check

fix bugs in pin and pin tests

check for block local before checking recursive pin
2015-04-19 23:40:25 -07:00
bf22aeec0a Reorged imports from jbenet/go-ipfs to ipfs/go-ipfs
- Modified Godeps/Godeps.json by hand
- [TEST] Updated welcome docs hash to sharness
- [TEST] Updated contact doc
- [TEST] disabled breaking test (t0080-repo refs local)
2015-03-31 12:52:25 -07:00
13c489eca1 fix context respect through fuse reading 2015-03-24 12:23:01 -07:00
13de031b44 code cleanup and better naming of methods 2015-03-24 12:23:01 -07:00
50f0b06bdf Correct pinning for dagmodifier, and a bunch more tests 2015-03-11 19:38:01 -07:00
5ead2a9fab overwrite optimization for dagmodifier 2015-03-11 19:38:01 -07:00
370285fcfa remove temp code in Coal test, and make Size not have to flush 2015-03-11 19:38:01 -07:00
218cc0185c remove pointless TODO 2015-03-11 19:38:01 -07:00
3119088ae7 address comments from @cryptix in PR 2015-03-11 19:38:01 -07:00
58d5c852fd add benchmark 2015-03-11 19:38:01 -07:00
136bece850 Code cleanup 2015-03-11 19:38:01 -07:00
9832545d84 better error message from dagreader with bad protofbuf 2015-03-11 19:38:01 -07:00
63e15abd8f refactor dagmodifier to work with trickledag format 2015-03-11 19:38:01 -07:00
1d5b903611 added cancel func calls previously ignored 2015-03-07 09:31:46 -08:00
0e9772c57e refactoring unixfs node and importer/helpers to match 2015-03-06 22:12:03 -08:00
5b5d3221fd don't depend on go-logging - use it through util instead. 2015-02-27 14:19:08 +01:00
92d08db7a5 rewrote import paths of go.net/context to use golang.org/x/context
- updated go-ctxgroup and goprocess
ctxgroup: AddChildGroup was changed to AddChild. Used in two files:
- p2p/net/mock/mock_net.go
- routing/dht/dht.go

- updated context from hg repo to git
prev. commit in hg was ad01a6fcc8a19d3a4478c836895ffe883bd2ceab. (context: make parentCancelCtx iterative)
represents commit 84f8955a887232b6308d79c68b8db44f64df455c in git repo

- updated context to master (b6fdb7d8a4ccefede406f8fe0f017fb58265054c)

Aaron Jacobs (2):
net/context: Don't accept a context in the DoSomethingSlow example.
context: Be clear that users must cancel the result of WithCancel.

Andrew Gerrand (1):
go.net: use golang.org/x/... import paths

Bryan C. Mills (1):
net/context: Don't leak goroutines in Done example.

Damien Neil (1):
context: fix removal of cancelled timer contexts from parent

David Symonds (2):
context: Fix WithValue example code.
net: add import comments.

Sameer Ajmani (1):
context: fix TestAllocs to account for ints in interfaces
2015-02-25 11:58:19 +01:00
ccb693ab4d teach unixfs/tar (aka ipfs get) how to use GetBlocks 2015-02-18 09:00:01 +00:00
bbcdeb74d2 fix: vendor 2015-02-04 15:32:49 -08:00
b79fffc965 implement metadata node for unixfs and other 2015-02-04 23:07:12 +00:00
1e93ee00c0 clean up benchmarks, implement WriterTo on DAGReader, and optimize DagReader 2015-02-04 21:59:51 +00:00
fcd8ebcca5 NewDagReader: return DagReader for more functions
Since the DagReader has lots of useful information (like sizes etc)
it's good to be able to use it.
2015-02-01 19:24:36 -08:00
73234479fa init docs: go generated welcome dir + files
updated sharness hashes
2015-01-31 07:51:30 -08:00
abb3c9c9c4 implement path type 2015-01-29 17:51:08 +00:00
2eca66e6d2 off by one error seeking to end of single block file 2015-01-27 07:41:51 +00:00
4940c3e0ae Merge pull request #655 from jbenet/feat/dagseek
Implement io.Seeker on unixio.DAGReader
2015-01-26 19:33:41 -08:00
45e4352c9c dropped down log.Errors 2015-01-26 19:13:44 -08:00
ba4ea139b9 address concerns from PR 2015-01-27 01:33:09 +00:00