Commit Graph

7954 Commits

Author SHA1 Message Date
Jeromy Johnson
1d0c00eb29 Merge pull request #3090 from ipfs/feat/test-cover-blocks-util
test: 100% coverage for blocks/blocksutil
2016-08-16 09:22:07 -07:00
Jeromy Johnson
4eb7c6c353 Merge pull request #3085 from ipfs/fix-test_fsh
ipfs-test-lib: fix test_fsh arg quoting
2016-08-16 09:21:59 -07:00
Jakub Sztandera
594c946606
docs: decapitalize error message in blocks.go
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2016-08-16 17:36:18 +02:00
Jakub Sztandera
21cbb90960
test: 100% coverage for blocks/blocksutil
This was easy.

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2016-08-16 13:03:20 +02:00
Jakub Sztandera
a63b5c38b7
test: make the test bit cleaner
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2016-08-16 12:53:27 +02:00
Jakub Sztandera
2408f866c5
blocks: rename errWrongHash to ErrWrongHash
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2016-08-16 12:42:18 +02:00
Kevin Atkinson
c88b4b0941 "block rm": remove the option to ignore pins
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2016-08-15 13:17:43 -04:00
Kevin Atkinson
efeb789878 Check for multiple pinned blocks in a single pass.
Provide a new method, Pinner.CheckIfPinned(), which will check if
any of the arguments are pinned.  Previously IsPinned would need to be
called once for each block.  The new method will speed up the checking
of multiple pinned blocks from O(p*n) to O(p) (where p is the number
of pinned blocks and n is the number of blocks to be check)

Use the new method in "block rm".

License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2016-08-15 13:17:43 -04:00
Kevin Atkinson
6ad497bcf0 "block rm": use channel instead of pipe / don't abort on non-fatal error
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2016-08-15 13:17:43 -04:00
Kevin Atkinson
453be22dfb Add "ipfs block rm" command.
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2016-08-15 13:17:43 -04:00
Jakub Sztandera
68d5197265
test: do explicit error check
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@ipfs.io>
2016-08-15 17:23:44 +02:00
Richard Littauer
b76dcb8dd7 Add period to ipfs pin rm
Small doc fix.

License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
2016-08-15 10:46:15 -04:00
Jakub Sztandera
233a622ed0
test: 81% coverage on blockstore
Coverage report available at: https://ipfs.io/ipfs/QmTuMtwGCfHrbYyZdQ1RaGNwS2MGsmAkjA8AaB69N7Ya1g/coverage.html#file0

Part of #3053

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@ipfs.io>
2016-08-15 16:21:52 +02:00
Kevin Simper
e3a42d983e Update dns help with a correct domain name
Closes https://github.com/ipfs/faq/issues/161

License: MIT
Signed-off-by: Kevin Simper <kevin.simper@gmail.com>
2016-08-15 13:24:41 +02:00
Jakub Sztandera
fcdf52735e test: 82% coverage on blocks
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2016-08-15 12:47:50 +02:00
Christian Couder
2489dfe8a9 ipfs-test-lib: fix test_fsh arg quoting
test_fsh() should quote its arguments before passing them
to `eval` otherwise there are problems when the arguments
contain spaces.

For example when running the following program:

```
#!/bin/sh

. ./ipfs-test-lib.sh

die () {
    printf >&2 "%s\n" "$@"
    exit 1
}

DIR1="test dir 1"
DIR2="test dir 2"

mkdir "$DIR1" "$DIR2" || die "Could not mkdir '$DIR1' '$DIR2'"

echo "in dir 1" >"$DIR1/file1" || die "Could not write into '$DIR1/file1'"
echo "in dir 2" >"$DIR2/file2" || die "Could not write into '$DIR2/file2'"

if test_cmp "$DIR1/file1" "$DIR2/file2"
then
    echo "test_cmp succeeded!"
else
    echo "test_cmp failed!"
fi

rm -rf "$DIR1" "$DIR2" || die "Could not rm -rf '$DIR1' '$DIR2'"

```

we get:

```
> diff -u test dir 1/file1 test dir 2/file2
diff: extra operand '1/file1'
diff: Try 'diff --help' for more information.

test_cmp failed!
```

License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2016-08-15 12:10:15 +02:00
Jakub Sztandera
9437b3af61 test: 100% coverage on blocks/set
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2016-08-15 12:03:43 +02:00
Mathijs de Bruin
0aad342306 Improve command documentation for listing commands (Fixes #3057).
* Document deprecation of 'ipfs file' in command help.
* Be explicit about 'ipfs ls' listing unixfs and suplying type in JSON.
* Amend description for 'ipfs files ls'.

License: MIT
Signed-off-by: Mathijs de Bruin <mathijs@mathijsfietst.nl>
2016-08-13 11:17:50 +02:00
Jakub Sztandera
e26ce572a0 bin: dist_get script: prevents get_go_vars() returns same values twice
License: MIT
Signed-off-by: Ariel Machado <sparciie@yahoo.com>
2016-08-12 21:03:08 +02:00
Jakub Sztandera
cf23ab9ff4 deps: move go-is-domain to gx
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2016-08-12 16:41:18 +02:00
Jeromy
685cd28dc8
ipfs version 0.4.3-rc3
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-08-09 19:22:46 -07:00
Jeromy
ab0492c3e9 update changelog
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-08-09 16:25:36 -07:00
Jeromy Johnson
16f857040f Merge pull request #3050 from ipfs/fix/stdin-zero-panic
commands: fix panic when stdin is empty for string args
2016-08-07 12:23:23 -07:00
Jeromy
1581265c2c readme: add notes on building for uncommon systems
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-08-07 10:31:59 -07:00
Jeromy Johnson
6e5d0ab6e3 Merge pull request #3048 from zramsay/boot2docker-is-deprecated
boot2docker-cli is deprecated, removed from README
2016-08-07 09:34:55 -07:00
Jeromy
8a75a8cf08 commands: fix panic when stdin is empty for string args
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-08-07 09:24:17 -07:00
zramsay
3069adf535 boot2docker-cli is deprecated, removed from README
- Docker for Mac/Windows is out of beta
- docker-machine is recommended for unsupported machines

License: MIT
Signed-off-by: Zach Ramsay <zach@erisindustries.com>
2016-08-06 23:28:16 +01:00
Thomas Gardner
1079acf695 bitswap: add ledger subcommand
License: MIT
Signed-off-by: Thomas Gardner <tmg@fastmail.com>
2016-08-05 19:35:34 +10:00
Jesse Weinstein
1d6a47bf93 Make all Taglines use imperative mood
License: MIT
Signed-off-by: Jesse Weinstein <jesse@wefu.org>
2016-08-04 16:45:59 -07:00
Jakub Sztandera
cc60f6909b make: cleanup -rm calls
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2016-08-04 16:38:00 +02:00
Jakub Sztandera
f93ce30018 make: squash install, build and nofuse rules
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2016-08-04 16:38:00 +02:00
Jakub Sztandera
c1014aea88 make: 'make clean' clears sharness too
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2016-08-04 16:38:00 +02:00
Jakub Sztandera
f3dc11c566 use $(MAKE) instead of 'make' in Makefiles
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2016-08-04 16:38:00 +02:00
Jakub Sztandera
63072758a9 make: use 'make -C' instead of 'cd && make'
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2016-08-04 16:38:00 +02:00
Jakub Sztandera
7be60c9b13 make: run sharness in single thread
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2016-08-04 16:38:00 +02:00
Jeromy Johnson
1eb94e64e3 Merge pull request #2990 from csasarak/janky_version
Alias 'ipfs --version' to 'ipfs version'
2016-08-04 06:58:15 -07:00
Jeromy
813bcb641d ipfs version 0.4.3-rc2
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-08-04 03:50:18 -07:00
Jeromy
5ac6ede829 update changelog
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-08-04 03:50:18 -07:00
Jeromy
8fd6c82834 update changelog about ipfs add progress fix
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-08-04 03:50:18 -07:00
Jakub Sztandera
16e0c7b4ac CHANGELOG for 0.4.3-rc2
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2016-08-04 03:50:18 -07:00
Jeromy Johnson
2a4560c396 Merge pull request #3036 from ipfs/fix/wlist-race
bitswap: fix a minor data race
2016-08-04 03:46:38 -07:00
Jeromy Johnson
af0d9c0ef1 Merge pull request #3037 from ipfs/feat/detect-issue-3032
dht: add in code to detect and diagnose #3032
2016-08-04 03:46:25 -07:00
Jeromy
71a699ca09 bitswap: fix a minor data race
race detector picked up a minor race condition, Since loop iteration
reuses the same local variable, its not safe to take its address and use
it concurrently. The fix is to rebind the variable into a controlled
scope (creating a new variable) and taking the address of that to pass
outwards.

License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-08-04 03:33:00 -07:00
Jeromy
ce6782a22d dht: add in code to detect and diagnose #3032
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-08-03 18:19:47 -07:00
Jeromy Johnson
241bfceeb3 Merge pull request #3017 from JesseWeinstein/fix_doc
-enc is spelled with two dashes, not one
2016-08-03 11:21:35 -07:00
Jeromy Johnson
5a831ff16d Merge pull request #3033 from ipfs/fix/stdin-read-msg
commands/cli: fix reading from stdin message
2016-08-03 11:19:34 -07:00
Jeromy Johnson
ffba700ea6 Merge pull request #3022 from ipfs/feature/daemon-mount-offline-flag
Feature/daemon mount offline flag
2016-08-03 10:30:54 -07:00
Jeromy
068c6d2211 commands/cli: fix reading from stdin message
Only print "Reading from /dev/stdin" message when we actually read from
stdin (and not in other cases such as ipfs add --help).

License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-08-03 09:04:41 -07:00
Jakub Sztandera
a42302443b cli: reword message about mount and offline
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2016-08-03 08:04:07 -07:00
Jeromy Johnson
16c5a89dd4 Merge pull request #3023 from ipfs/feature/eval-symlink-windows
cli: do ToSlash after EvalSymlinks to remove platform specific slashes
2016-08-03 06:29:54 -07:00