Commit Graph

845 Commits

Author SHA1 Message Date
Juan Batiz-Benet
13cd226bff Merge pull request #1317 from ipfs/builder-default
make the default repo for corebuilder work
2015-06-03 16:30:02 -07:00
Jeromy
6b16981979 make the default repo for corebuilder work 2015-06-03 16:06:15 -07:00
Jeromy
40e423d6dc implement an ipfs patch command for modifying merkledag objects
WIP: object creator command

better docs

move patch command into object namespace

dont ignore cancel funcs

addressing comment from CR

add two new subcommands to object patch and clean up main Run func

cancel contexts in early returns

switch to util.Key
2015-06-03 15:24:07 -07:00
rht
f239a38fbb golint on core/commands 2015-06-03 18:44:28 +07:00
rht
c14ab9bd51 go vet on core/commands 2015-06-03 17:20:40 +07:00
Travis Person
11780198b6 Text under ipfs name --help incorrect
Change help text to display proper results from an `ipfs name resolve`.
2015-06-02 00:08:33 -07:00
Jeromy
ef294431d4 move util.Key into its own package under blocks 2015-06-01 16:10:08 -07:00
Juan Batiz-Benet
e9fec3d5ee updated webui to 0.2.0 2015-06-01 00:37:02 -07:00
Juan Batiz-Benet
0ecf7babd4 Merge pull request #1269 from ipfs/rm-testing
move core mock into its own package
2015-05-31 15:59:47 -07:00
Jeromy
4a78a9729d remove testing imports from non testing code
rename bserv mock to mock_test

swap out testing.T for an interface
2015-05-31 15:41:59 -07:00
David
2f3ee86e2b Update option help for ipfs stats bw --poll
Help text from --proto was copy pasted.
2015-05-31 18:26:51 -04:00
Juan Batiz-Benet
5d43ebb916 Merge pull request #1274 from ipfs/refactor/importer
change pinning to happen in a callback
2015-05-29 17:06:11 -07:00
Juan Batiz-Benet
ecdf14962c Merge pull request #1294 from rht/cleanup-tour
Cleanup tour
2015-05-29 16:59:17 -07:00
Jeromy
b660f937bd make callback take a node instead of a key 2015-05-28 08:52:20 -07:00
Jeromy
dd928a2b1d change pinning to happen in a callback 2015-05-28 08:52:20 -07:00
rht
3547f7ae33 Replace 'var * bytes.Buffer' with '\1 := new(bytes.Buffer)' 2015-05-26 23:18:04 +07:00
rht
8cad2d2c89 Move 'tour' to core/commands
Side effect: this makes 'tour' accessible through the HTTP API
2015-05-26 21:04:03 +07:00
David Dias
b2e45da0cc Change one of the "ipfs" to "ipns" 2015-05-26 13:07:54 +01:00
Juan Batiz-Benet
4e71ce3cc7 Merge pull request #1272 from Luzifer/fix/dnslink
Fix: dnslink domain resolving was broken; Add: no caching for those
2015-05-24 18:47:54 +02:00
Juan Batiz-Benet
c8cb8d9c39 Merge pull request #1278 from ipfs/fix/bs-cmd-offline
make bitswap commands error out properly offline
2015-05-22 22:54:51 +02:00
Travis Person
2c71c54823 Named error for no components
Update the previous `invalid path` error to match the error returned
from `SplitAbsPath`.
2015-05-22 09:18:49 -07:00
Travis Person
d96246c622 Fixed tests to actually test for the error we are seeking
Cleaned the tests, and actually test for the error.
2015-05-22 08:56:33 -07:00
Travis Person
dcc4da0b37 Replaced old logic to check for valid path
Added the original logic to check for a invalid path and a simple test.
2015-05-22 08:56:33 -07:00
Travis Person
42289d4f21 Daemon panics if no path is given
If no path after `/ipfs/` or `/ipns/` is given, then the daemon will
panic with a slice bounds out of range error. This checks to see if we
have anything after `ipfs` or `ipns`.
2015-05-22 08:56:33 -07:00
Jeromy
648526d8f0 make bitswap commands error out properly offline 2015-05-21 22:41:44 -07:00
Jeromy
60ac59139c fix offline full path resolution bug 2015-05-21 14:45:30 -07:00
Knut Ahlers
8df8737f6a removed requirement of path package 2015-05-21 08:51:18 +02:00
Knut Ahlers
373260d373 Fix: dnslink domain resolving was broken; Add: no caching for those
fixes #1234
fixes #1267
2015-05-21 08:44:17 +02:00
Jeromy
f6fadc4c91 do http server properly so daemon can shut down 2015-05-20 22:42:54 -07:00
Juan Batiz-Benet
9b4b2c6879 Merge pull request #1235 from Luzifer/fix/dnslink-issues
Fix: Using the `dnslink` feature led to infinite redirects
2015-05-20 23:59:01 -04:00
Knut Ahlers
1b3797474f Fix: Using the dnslink feature led to infinite redirects
fixes #1233
2015-05-20 19:42:28 +02:00
Jeromy
002cf5128e fix silent refs failure 2015-05-20 09:46:22 -07:00
W. Trevor King
1e6594d087 namesys/dns: Pluggable lookupTXT field
So we can attach a mock lookup function for testing.
2015-05-20 08:40:44 -07:00
W. Trevor King
e4447b3c96 core/commands/publish: Fix published message
Previously we had a confusing situation, with:

* single-arg doc: published name <name> to <value>
* double-arg doc: published name <value> to <name>
* implementation: Published name <name> to <value>

Now we have the uniform:

  Published to <name>: <value>

With the following goals:

1. It's clear that we're writing <value> to <name>'s IPNS slot in the
   DHT.
2. We preserve the order of arguments from the command-line
   invocation:

     $ ipfs name publish <name> <value>
     Published to <name>: <value>
2015-05-20 08:40:44 -07:00
W. Trevor King
416d454b42 core/commands: Make 'ipfs name resolve' IPNS-only
And add a generic 'ipfs resolve' to handle cross-protocol name
resolution.
2015-05-20 08:40:44 -07:00
W. Trevor King
e643f72c86 core/commands/dns: Add 'ipfs dns ...' for resolving DNS references
This lets users resolve (recursively or not) DNS links without pulling
in the other protocols.  That makes an easier, more isolated target
for alternative implemenations, since they don't need to understand
IPNS, proquint, etc. to handle these resolutions.
2015-05-20 08:40:44 -07:00
W. Trevor King
c2ff02850b core/commands/resolve: Add a -r / --recursive option
For explicitly enabling recursive behaviour (it was previously always
enabled).  That allows folks who are interested in understanding
layered indirection to step through the chain one link at a time.
2015-05-20 08:40:42 -07:00
W. Trevor King
3ead2443e5 namesys: Add recursive resolution
This allows direct access to the earlier protocol-specific Resolve
implementations.  The guts of each protocol-specific resolver are in
the internal resolveOnce method, and we've added a new:

  ResolveN(ctx, name, depth)

method to the public interface.  There's also:

  Resolve(ctx, name)

which wraps ResolveN using DefaultDepthLimit.  The extra API endpoint
is intended to reduce the likelyhood of clients accidentally calling
the more dangerous ResolveN with a nonsensically high or infinite
depth.  On IRC on 2015-05-17, Juan said:

15:34 <jbenet> If 90% of uses is the reduced API with no chance to
  screw it up, that's a huge win.
15:34 <wking> Why would those 90% not just set depth=0 or depth=1,
  depending on which they need?
15:34 <jbenet> Because people will start writing `r.Resolve(ctx, name,
  d)` where d is a variable.
15:35 <wking> And then accidentally set that variable to some huge
  number?
15:35 <jbenet> Grom experience, i've seen this happen _dozens_ of
  times. people screw trivial things up.
15:35 <wking> Why won't those same people be using ResolveN?
15:36 <jbenet> Because almost every example they see will tell them to
  use Resolve(), and they will mostly stay away from ResolveN.

The per-prodocol versions also resolve recursively within their
protocol.  For example:

  DNSResolver.Resolve(ctx, "ipfs.io", 0)

will recursively resolve DNS links until the referenced value is no
longer a DNS link.

I also renamed the multi-protocol ipfs NameSystem (defined in
namesys/namesys.go) to 'mpns' (for Multi-Protocol Name System),
because I wasn't clear on whether IPNS applied to the whole system or
just to to the DHT-based system.  The new name is unambiguously
multi-protocol, which is good.  It would be nice to have a distinct
name for the DHT-based link system.

Now that resolver output is always prefixed with a namespace and
unprefixed mpns resolver input is interpreted as /ipfs/,
core/corehttp/ipns_hostname.go can dispense with it's old manual
/ipfs/ injection.

Now that the Resolver interface handles recursion, we don't need the
resolveRecurse helper in core/pathresolver.go.  The pathresolver
cleanup also called for an adjustment to FromSegments to more easily
get slash-prefixed paths.

Now that recursive resolution with the namesys/namesys.go composite
resolver always gets you to an /ipfs/... path, there's no need for the
/ipns/ special case in fuse/ipns/ipns_unix.go.

Now that DNS links can be things other than /ipfs/ or DHT-link
references (e.g. they could be /ipns/<domain-name> references) I've
also loosened the ParsePath logic to only attempt multihash validation
on IPFS paths.  It checks to ensure that other paths have a
known-protocol prefix, but otherwise leaves them alone.

I also changed some key-stringification from .Pretty() to .String()
following the potential deprecation mentioned in util/key.go.
2015-05-20 08:40:05 -07:00
Juan Batiz-Benet
c561c0980b Merge pull request #1239 from rht/master
Add gofmt check
2015-05-19 04:03:23 -04:00
rht
ac7edddb94 Run 'gofmt -s -w' on these files 2015-05-19 06:11:15 +07:00
Juan Batiz-Benet
eea6921fcd Merge pull request #1242 from ipfs/perf/add
remove unnecessary flush, and buffer output channel
2015-05-18 18:39:19 -04:00
Juan Batiz-Benet
9c4135fe08 Merge pull request #1240 from vijayee/master
removed braintree/manners
2015-05-18 18:33:16 -04:00
Jeromy
a67af7d9c1 remove unnecessary flush, and buffer output channel 2015-05-18 14:55:58 -07:00
Vijayee Kulkaa
fcb8be5607 removed braintree/manners 2015-05-18 15:28:55 -04:00
Juan Batiz-Benet
88be96bc8c Merge pull request #1229 from timgws/tiny-doc-update
Fix documentation on swarm connect.
2015-05-14 21:52:20 -04:00
Juan Batiz-Benet
cb7c82845e Merge pull request #1220 from ipfs/travis-test-all-commits
Get travis to test all commits
2015-05-14 15:14:30 -04:00
Tim Groeneveld
26ba3e1f74 Issue #873. Thought I might do a small change first to get my feet wet. 2015-05-13 08:15:00 +10:00
Henry
4537311f59 http gw: disable PUT and writable tests - again... :( 2015-05-10 15:30:12 +02:00
Juan Batiz-Benet
6dd8aeb00a config set: allow arbitrary json input
This commit allows arbitrary json input to set.
It also tests this with sharness.
2015-05-10 08:28:35 -04:00
Henry
87ce7abe47 unixfs/io: added NewEmptyDirectory()
some golinting along the way
2015-05-10 07:36:28 -04:00