1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-30 09:59:13 +08:00

9326 Commits

Author SHA1 Message Date
1f29699d90 Address c.r. and additional tweaks.
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2018-07-13 09:07:52 -04:00
8dd970b73a filestore: Return consistent err msg. when file/urlstore is not enabled.
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2018-07-13 09:07:52 -04:00
6a4b1262a5 Make sure you can't add URL's unless the url store is enabled.
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2018-07-13 09:07:52 -04:00
0c2efb90d3 More test fixes.
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2018-07-13 09:07:52 -04:00
ed2bb81b8d Code cleanups to make code climate happy.
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2018-07-13 09:07:52 -04:00
0e24444280 Add some documentation to ipfs urlstore add command.
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2018-07-13 09:07:52 -04:00
b3457f240c Enhance tests.
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2018-07-13 09:07:52 -04:00
e5189f4230 Return better error code when an http request failed.
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2018-07-13 09:07:51 -04:00
90972095a9 Add test cases for urlstore.
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2018-07-13 09:07:51 -04:00
b53a1b3022 Add config option to enable urlstore.
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2018-07-13 09:07:51 -04:00
696a0f039e Simplify code: use prefix instead of flag to determine if a url
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2018-07-13 09:07:51 -04:00
d59a6e99a6 Fix "ipfs urlstore add" output.
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2018-07-13 09:04:22 -04:00
1a835202b2 filestore: add URLStore
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2018-07-13 09:04:22 -04:00
92ac43afef Merge pull request #5179 from ipfs/release-0.4.16
Ipfs 0.4.16 release
v0.4.16
2018-07-13 13:06:39 +02:00
7bcc9caa84 Ipfs 0.4.16 release
License: MIT
Signed-off-by: Whyrusleeping <why@ipfs.com>
2018-07-13 13:00:41 +02:00
265295c789 add a note about the fixed js interop
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-07-13 13:00:23 +02:00
da061c2faf Tweak grammar and language in changelog
License: MIT
Signed-off-by: Rob Brackett <rob@robbrackett.com>
2018-07-13 13:00:23 +02:00
6018de3fb5 add a note about the repo migration
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-07-13 13:00:23 +02:00
8f51d011a3 paragraphs
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-07-13 13:00:23 +02:00
10201db139 mfs: remove sort from ListNames()
License: MIT
Signed-off-by: Lucas Molas <schomatis@gmail.com>
2018-07-12 11:05:56 -03:00
4334ddeb35 commands/files: add error messages for cp paths
License: MIT
Signed-off-by: Lucas Molas <schomatis@gmail.com>
2018-07-12 10:55:48 -03:00
a9efa7e201 Merge pull request #5214 from ipfs/gx/release-0.4.16-rc3
publish the gx 0.4.16-rc3 release
2018-07-11 15:53:09 +02:00
bf0750a3c1 publish the gx 0.4.16-rc3 release
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-07-11 13:37:44 +02:00
7207b1c1c9 Merge pull request #5207 from ipfs/release-0.4.16-rc3
Ipfs v0.4.16-rc3
v0.4.16-rc3
2018-07-09 08:53:27 -07:00
310b16528b Ipfs v0.4.16-rc3
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2018-07-09 08:46:20 -07:00
ec61606378 core/commands/ls: wrap NewDirectoryFromNode error
License: MIT
Signed-off-by: Lucas Molas <schomatis@gmail.com>
2018-07-09 12:37:42 -03:00
c47cd13c0b unixfs: remove unused ShardSplitThreshold variable
License: MIT
Signed-off-by: Lucas Molas <schomatis@gmail.com>
2018-07-09 12:02:47 -03:00
7d531c00ac unixfs: add a directory interface
Add a UnixFS `Directory` that hides implementation details and helps to
distinguish *what* is a UnixFS directory.

Replace the `unixfs.io.Directory` structure that contained the HAMT and basic
directory implementations (through inner pointers) with an interface containing
the same methods. Implement those methods in two clearly distinct structures for
each implementation (`BasicDirectory` and `HAMTDirectory`) avoiding pointer
logic and clearly differentiating which implementation does what.

The potential basic to HAMT transition was being hidden behind the `AddChild`
call at the UnixFS layer (changing one implementation pointer  with the other
one), it is now being explicitly done at the MFS layer.

Rename the `dirbuilder.go` file to `directory.go` and change the `Directory` MFS
attribute `dirbuilder` to `unixfsDir` to be consistent.

License: MIT
Signed-off-by: Lucas Molas <schomatis@gmail.com>
2018-07-09 12:02:22 -03:00
8a9aa41542 Merge pull request #5202 from ipfs/fix/dnslink-recursion-alt
correctly handle multi-hop dnslink resolution
2018-07-09 09:01:32 +00:00
0461716b3b Merge pull request #5200 from ipfs/fix/5197
fix dht commands when pubsub routing is enabled
2018-07-09 01:41:31 -07:00
6f08c9e466 Refactor code
Keep the code style consistent. since all package alias are lowercase words, no need Camel Peak Name.

License: MIT
Signed-off-by: Spartucus <niubob@163.com>
2018-07-09 16:36:01 +08:00
7df7d11199 fix dht commands when pubsub routing is enabled
Instead of checking if Routing is a DHT (because it can now be a tiered
router and still contain a DHT), stash the DHT in a separate field in the IPFS
node (same as we do with the PSRouter).

fixes #5197

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-07-09 09:58:44 +02:00
9c8d994c76 remove debug print statement
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2018-07-08 13:01:54 +02:00
9d88d2cde8 RepoStat: address review comments
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2018-07-08 13:01:54 +02:00
37d4989647 Sharness: add tests for ipfs repo stat --size-only
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2018-07-08 13:01:46 +02:00
79b388c690 Feat: use datastore.DiskUsage() and add --size-only to "repo stat"
This makes use of the PersistentDatastore DiskUsage method to
obtain the Repo's storage usage (GetStorageUsage()).

Additionally, the --size-only flag has been added to the
"ipfs repo stat" command. This avoids counting the number of objects
in the repository and returns faster.

License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2018-07-08 13:01:46 +02:00
6a81c72cfb correctly handle multi-hop dnslink resolution
Namesys returns `ErrResolveRecursion` when it stops recursing due to a depth
limit. It doesn't return success.

Alternative to #5199.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-07-07 00:18:30 -07:00
cb0ad0d6ce fix starting iptb nodes with additional arguments
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-07-06 23:33:12 -07:00
efa4e332e9 update routing helpers to fix an issue in the parallel find providers
See: https://github.com/libp2p/go-libp2p-routing-helpers/pull/3

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-07-06 23:32:28 -07:00
18361d3849 unixfs: remove Get prefix from FSNode accessors
See https://golang.org/doc/effective_go.html#Getters.

License: MIT
Signed-off-by: Lucas Molas <schomatis@gmail.com>
2018-07-06 13:29:47 -03:00
acb9e23163 pbdagreader: use FSNode instead of protobuf structure
Focus on the UnixFS layer and avoid explicit references to protocol buffers
format (used to serialize objects of that layer). Use the `unixfs.FSNode`
structure which it abstracts from the `unixfs.pb.Data` format.

Replace `PBDagReader` field `ftpb.Data` with `ft.FSNode`, renaming it to `file`
(which is the type of UnixFS object represented in the reader) and changing its
comment removing the "cached" reference, as this structure is not used here as a
cache (`PBDagReader` doesn't modify the DAG, it's read-only). Also, removed
unused `ProtoNode` field to avoid confusions, as it would normally be present if
the `FSNode` was in fact used as a cache of the contents of the `ProtoNode`.

An example of the advantage of shifting the focus from the format to the UnixFS
layer is dropping the of use `len(pb.Blocksizes)` in favor of the more clear
`NumChildren()` abstraction.

Added `BlockSize()` accessor.

License: MIT
Signed-off-by: Lucas Molas <schomatis@gmail.com>
2018-07-06 13:27:18 -03:00
7fd34048ab explain when a promise can be canceled in pbdagreader
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-07-05 17:06:50 -07:00
e7938a1834 Merge pull request #5196 from ipfs/release-0.4.16-rc2
Ipfs 0.4.16 release candidate 2
v0.4.16-rc2
2018-07-05 16:16:30 -07:00
0bde02e59a Ipfs 0.4.16 release candidate 2
License: MIT
Signed-off-by: Whyrusleeping <why@ipfs.com>
2018-07-05 15:39:43 -07:00
48577e0a4c Merge pull request #5194 from ipfs/fix/5191
when running an external command, only construct a node if running in online mode
2018-07-05 15:10:49 -07:00
667a9c8999 add test for sharness locking
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-07-05 14:33:01 -07:00
b6081be32a only construct a node in online mode when running external commands.
This breaks commands like `ipfs update` that expect IPFS to *not* be running.

fixes #5191

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-07-05 14:32:44 -07:00
6ceb9373c6 dagreader: remove Offset() method
Remove `Offset()` from the `DagReader` interface. It's not part of the Unix API
and it wasn't used anywhere except for the tests (a helper function was added to
replace it).

License: MIT
Signed-off-by: Lucas Molas <schomatis@gmail.com>
2018-07-04 23:51:10 -03:00
cbc239ce44 sharness: add files ls test (without -l)
License: MIT
Signed-off-by: Lucas Molas <schomatis@gmail.com>
2018-07-02 17:17:46 -03:00
dfe64980ce cmd: fix files ls to report hash and size for files
License: MIT
Signed-off-by: Lucas Molas <schomatis@gmail.com>
2018-07-02 17:17:43 -03:00