1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-05 15:36:57 +08:00

106 Commits

Author SHA1 Message Date
dd928a2b1d change pinning to happen in a callback 2015-05-28 08:52:20 -07:00
a67af7d9c1 remove unnecessary flush, and buffer output channel 2015-05-18 14:55:58 -07:00
c322a4eb0f core/commands/add: Change add() to only accept a single reader
The change to an array of readers comes from e096060b
(refactor(core/commands2/add) split loop, 2014-11-06), where it's used
to setup readers for each path in the argument list.  However, since
6faeee83 (cmds2/add: temp fix for -r. horrible hack, 2014-11-11) the
argument looping moved outside of add() and into Run(), so we can drop
the multiple-reader support from add().

Adding a file can create multiple nodes (e.g. the splitter can chunk
the file into several blocks), but:

1. we were only appending a single node per reader to our returned
   list, and
2. we are only using the final node in that returned list,

so this commit also adjusts add() to return a single node reference
instead on an array of nodes.
2015-04-23 09:41:59 -07:00
861f30cc12 don't readd entire directories recursively 2015-04-20 16:21:00 -07:00
218aeeb77e cmds/add: silent error fix 2015-04-20 01:18:42 -07:00
140cd1fd1b remove debugerrors
We now consider debugerrors harmful: we've run into cases where
debugerror.Wrap() hid valuable error information (err == io.EOF?).
I've removed them from the main code, but left them in some tests.
Go errors are lacking, but unfortunately, this isn't the solution.

It is possible that debugerros.New or debugerrors.Errorf should
remain still (i.e. only remove debugerrors.Wrap) but we don't use
these errors often enough to keep.
2015-04-20 00:35:35 -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
69db1b4ec5 bugfix: add was not setting error 2015-04-12 07:53:04 -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
15b181ffe2 return early from add PostRun if error is set 2015-02-19 13:52:30 -08:00
140c70d772 document some packages 2015-02-10 22:59:10 +00:00
1ad5b345b8 core/commands: add: Added -w/--wrap-with-directory option 2015-02-02 10:07:35 -08:00
5706471897 commands: Made PostRun signature match Run 2015-01-23 18:29:31 -08:00
3fc9bedb0b commands: Made Std{in|out|err} accessible in Request/Response 2015-01-23 18:29:31 -08:00
b77d1c21b6 core/commands: add: Don't show progress bar when using --quiet option 2015-01-23 18:29:31 -08:00
121dfb10b4 core/commands: Fixed progress bar line clear race condition in 'add' 2015-01-23 18:29:31 -08:00
2363cb63e6 core/commands: Fixed 'add' progress bar sometimes not clearing progress bar output line 2015-01-23 18:29:31 -08:00
c3ea164f64 core/commands: Added progress bars for 'add'
squash! core/commands: Added progress bars for 'add'

Use vendored progress bar lib in 'add'
2015-01-23 18:29:30 -08:00
7b4de230eb commands: Refactored Command#Run function signature to (req Request, res Response) 2015-01-23 18:29:29 -08:00
31ae178078 commands: Support outputting <-chan interface{} 2015-01-21 04:28:02 +00:00
b91db68056 update pinning to new semantics, and fix a couple bugs 2015-01-21 04:28:01 +00:00
920ddc7fc3 Merge pull request #553 from jbenet/serial-file
Serial File Opening
2015-01-13 23:30:08 -08:00
70adc21d08 core/commands: Enable stdin arguments for 'add' and 'cat', resolves #542 2015-01-13 22:51:10 -08:00
7a579bbf79 commands: Moved files code into 'commands/files' subpackage 2015-01-13 22:50:53 -08:00
6236ef7fdb core/commands: Made add command output a channel
core/commands: Don't use pointers for Type field
2015-01-06 15:55:16 -08:00
abd390b892 core/commands: Made add command show streamed output 2015-01-06 15:53:48 -08:00
fd40702f73 commands: Changed Marshaler to return a io.Reader instead of a []byte
core/commands: Refactored command marshalers
2015-01-06 15:53:42 -08:00
0395a7af1e ipfs add output not sorted, cmds files sorted
I made the commands lib dir listing sort the contents
so we get the same sequence of files from it repeatably.
2015-01-06 14:02:49 -08:00
d490a85706 Make sure ipfs add output is sorted by name
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-01-06 13:12:22 -08:00
65c6bd07bf feat(core/commands): expose commands to allow for the development of high-level interface
+ style: sort command list

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:56:26 -08:00
5bfdc2e2b7 Add --quiet option to ipfs add
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2014-11-30 14:23:08 +01:00
87853f2bde core/commands: Made 'add' use OptionRecursivePath 2014-11-19 00:36:03 -08:00
5aaa45db9a transitioned ipfs2 -> ipfs 2014-11-18 06:15:00 -08:00
ad3f3e003f removed old commands files
https://www.youtube.com/watch?v=kyFyAqLtHq8
2014-11-18 06:15:00 -08:00
ce223eef61 some small cleanup of logging 2014-11-01 16:07:56 -07:00
ae339a0320 remove dagwriter in favor of new importer function 2014-10-31 05:03:42 +00:00
b5fc3caea3 cmd/add: output file hash Fixed #239 2014-10-30 06:15:23 -07:00
71ac117546 Address concerns in PR 2014-10-30 06:23:31 +00:00
18ada93ec3 rewrite add command to use dagwriter, moved a pinner into the dagwriter for inline pinning 2014-10-30 04:40:48 +00:00
31b0ff0307 add testing for pins 2014-10-22 00:28:41 -07:00
b204c21d10 add plumbing output + logging
Fixes #157
Found #158
2014-10-13 02:40:39 -07:00
bb84c232e1 make add command use absolute paths and print properly, issue #151 2014-10-10 13:46:51 -07:00
093c8fb04d Rework package structure for unixfs and subpackage
cc @jbenet
2014-10-08 21:14:18 +00:00
77fccaa2f3 Obviated need for .ID.Pretty() all over the place. 2014-10-06 04:23:55 -07:00
5592030ed3 working on dag modification structures, factored out the data format into an importer subpackage and added more ipns tests 2014-10-06 03:42:59 +00:00
ee1d1ac078 add: only show added once. 2014-10-04 03:56:12 -07:00
f923652d88 remove extra printf 2014-10-02 03:07:52 -07:00
728f17d3c9 cmd/ipfs/pin.go now uses MakeCommand
+ added recursive pinning func
2014-10-01 01:17:27 -07:00
8ddfb57c59 some bugfixes and added logging 2014-10-01 00:26:59 -07:00
b5fd9492d7 fixes to make interface more usable 2014-10-01 00:25:52 -07:00