Commit Graph

2670 Commits

Author SHA1 Message Date
Aaron Boodman 3ca817957e yet another cut at the readme 2016-07-31 23:11:35 -07:00
Aaron Boodman 73389aeffb Update README.md 2016-07-31 12:03:22 -07:00
Aaron Boodman 0e577a8858 Add the logo to the homepage 2016-07-31 11:51:26 -07:00
Erik Arvidsson 0d402acc9b Add README.md to js/ (#2211)
This is what gets shown on npmjs.org and other tools indexing npm
modules.
2016-07-30 13:11:42 -07:00
Adam Leventhal 754ed1b6dd ValueDecoder.readUnion() can use getCompoundType() rather than makeUnion() (#2210)
Clean up the tests that led us here
2016-07-30 11:21:04 -07:00
Adam Leventhal e920c12c1c Fix cyclic type nondeterminism (#2147) (#2148) 2016-07-29 21:35:17 -07:00
Erik Arvidsson ed0364cc19 Switch to gnuflag (#2206)
This is to support:
- shorthands
- Putting commands anywhere (after positional arguments too)
2016-07-29 18:08:23 -07:00
Ben Kalman 7460dc4d99 Wait for less to start before returning from outputpager.Start() (#2209) 2016-07-29 18:03:48 -07:00
Rafael Weinstein 3d86ddb33a Fix IndexedSequenceDiff bug when entire subtree is added / removed (#2197)
IndexedSequenceDiff special cases the situation when an entire subtree was added or removed, but got its math wrong.
2016-07-29 13:22:39 -07:00
Ben Kalman 1db33d33f8 Use correct first arg when printing "up to date" in noms sync (#2200) 2016-07-29 11:39:31 -07:00
Ben Kalman 467bdc9bc1 Let csv-importer take the metadata date as a flag (#2196) 2016-07-29 10:44:08 -07:00
Mike Gray 0e71059695 updating tour to match current output (#2199) 2016-07-29 13:28:24 -04:00
Mike Gray 5af05997fc initial go sdk tour (#2198) 2016-07-29 13:08:45 -04:00
cmasone-attic 593a649296 Merge pull request #2189 from cmasone-attic/issue2169
Remove NewSerializer
2016-07-29 08:00:52 -07:00
Erik Arvidsson dba9e5584b Print percentages in diff summary (#2195)
For example:

```
0 insertions (0.00%), 5,405 deletions (0.28%), 45 changes (0.00%), (1,938,935 entries vs 1,933,530 entries)
```

Fixes #2194
Towards #2031
2016-07-28 18:04:33 -07:00
Ben Kalman b2096234fd Make the output pager close the pipes it creates (#2187)
This makes less exit properly - before, it wasn't properly restoring the
terminal sometimes, and keyboard input stopped working.
Fixes https://github.com/attic-labs/noms/issues/2180.
2016-07-28 17:55:18 -07:00
Ben Kalman 6d2710a04e Simplify the channel logic in diff.go/summary.go (#2190)
Earlier I'd used 2 channels and selected over them, but as I found
elsewhere, this doesn't scale very well. It's simpler to just use a
close channel with a buffer size of 1.
2016-07-28 17:44:20 -07:00
Erik Arvidsson ff88ff2a65 Commit type: Compute the type for meta too (#2185)
This changes to compute the type for the meta field in a similar
way to how we compute the type for the value field.

Fixes #2179
2016-07-28 17:14:35 -07:00
Erik Arvidsson a995d5dafc Disallow nil in Value Equals (#2156)
We do not allow nil in any other places as a Vale so there is
little reason to allow it Equals

Fixes #2155
2016-07-28 16:58:33 -07:00
Rafael Weinstein 74ba1012c2 sequence.getOffset => sequence.cumulativeNumLeaves (#2193)
sequence.getOffset was problematic and didn't have a clear meaning. In addition it was causing a bunch of +1 code at call sites. This patch replaces it with cumulativeNumLeaves which has a clearer meaning.
2016-07-28 16:55:41 -07:00
Erik Arvidsson 26b94cf816 Minor cleanup of noms diff code (#2191) 2016-07-28 16:55:37 -07:00
Rafael Weinstein 1dc71c7f27 Align JS & Go impl of binary search (#2192) 2016-07-28 16:44:49 -07:00
Chris Masone b0112ba52b Remove NewSerializer
NewSerializer spun up a goroutine within itself. We've decided
this is an anti-pattern. Furthermore, we were using this inside
our remote database handler code, and a panic inside that goroutine
could take down the server. The callsites now use Serialize() directly.

Fixes #2169
2016-07-28 16:05:03 -07:00
Erik Arvidsson b20bec9b23 noms diff --summarize (#2183)
Shows number of changes between two top level values.

```
noms diff -summarize $l::#t5p4im6uug7n5m72frr0dnjnkm04e4ph.value $l::#ueo0utduuqsf9vrntrhn25lnc19m848l.value
```

Prints:

```
13,636 insertions, 0 deletions, 107 changes, (1,919,894 values vs 1,933,530 values)
```

Where the numbers are updated as more data is computed from the diff.

Towards #2031
2016-07-28 15:01:27 -07:00
Ben Kalman c1472fdd03 Make sure top-down and left-right diff finish before returning from best (#2184)
Leaving them running will cause a few database reads after
orderedSequenceDiffBest returns, and it looks like this is causing a
deadlock (see https://github.com/attic-labs/noms/issues/2165). I've also
seen a log related crash which goes away after this patch.
2016-07-28 14:57:31 -07:00
Ben Kalman 8330f3b7f3 Print closing brace for struct diff (#2178) 2016-07-27 17:36:14 -07:00
Ben Kalman deab7606b2 Fix empty sequence in getCompositeChildSequence (#2167)
Based on a patch by mike@mikegray.org
2016-07-27 17:12:35 -07:00
Ben Kalman 7998f302be Don't quote struct field names in diff (#2177) 2016-07-27 16:14:35 -07:00
Erik Arvidsson b0e77c250c Cleanup Struct Diff (#2160)
- Too have same API as all the other diff methods
- Send changes to channel without intermediary slices and without the
need to union and sort the fields
2016-07-27 14:56:22 -07:00
cmasone-attic a2c406512a Merge pull request #2171 from cmasone-attic/issue2170
Add comment explaining DynamoDB table format to dynamo_store.go
2016-07-27 13:16:18 -07:00
Chris Masone afb50a6272 Add comment explaining DynamoDB table format to dynamo_store.go
Fixes #2170
2016-07-27 12:37:13 -07:00
Aaron Boodman df2831b0fb Update intro.md 2016-07-27 08:49:42 -07:00
Ben Kalman 57bd3d2540 Make map diff print headers for each block of additions/deletions (#2166)
Previously a header was only printed once per entire map. This led to a
confusing diff where if a map like:

```
{
  "a": {
    "b": 1
  }
}
```

changed to:

```
{
  "a": {
    "b": 2
  },
  "c": {
    "d": 3
  }
}
```

then the diff would be:

```
/["a"]
- "b": 1
+ "b": 2
+ "c": {
+   "d": 3
+ }
```

which makes it look like the "c" change is part of the ["a"]["b"] one.

After this change, the diff will be:

```
/["a"]
- "b": 1
+ "b": 2
/
+ "c": {
+   "d": 3
+ }
```

I also fixed up a bit of the diff formatting in this change.
2016-07-26 16:48:33 -07:00
Erik Arvidsson 7a4436e9b5 Remove Type name property (#2161)
Only struct types have a name property and this was left over from
an earlier refactoring.
2016-07-26 15:31:43 -07:00
Ben Kalman b7653d3875 Fix 2 deadlocks in orderedSequenceDiffBest causing noms log to hang (#2153)
First: diff wasn't checking whether it had stopped before sending the
final set of changes. If the caller had stopped - and therefore no
longer reading from the changes channel - diff would hang.

Second: the same close channel was being used on 2 threads and it was
possible for both to read the close signal - causing the other to hang.
2016-07-26 14:09:20 -07:00
cmasone-attic 72e134bf85 Merge pull request #2159 from vinibaggio/dynamo-store-accepts-aws-config
go/chunks: adds convenience constructor for DynamoStore.
2016-07-26 13:45:30 -07:00
Vinicius Baggio Fuentes 9e7f1aaef7 go/chunks: changes convenience constructor for DynamoStore.
The convenience constructor changed in this patch takes in a aws.Config
object directly. This allows any implementation of the mentioned interface
to be passed in to Noms's Dynamo store -- giving flexibility for client
code to add their own credential acquisition mechanisms, for instance.

[fixes #2151]
2016-07-26 11:52:09 -07:00
Aaron Boodman f6b368b8db Update cli-tour.md 2016-07-25 15:51:49 -07:00
Erik Arvidsson 97093afa8c Rename csv StringToType to StringToValue (#2154) 2016-07-25 14:46:11 -07:00
Erik Arvidsson fcf9161d6a Include the meta field when pulling (#2152)
We need to also pull over the meta field. The references in meta are
already getting pulled over by `Chunks()`. If we do not pull over the
meta field we get a different commit value, with a different hash
which leads to newer pulls not being able to merge cleanly.

Fixes #2112
2016-07-25 14:28:04 -07:00
Aaron Boodman 9c059345e1 Update README.md 2016-07-25 14:14:48 -07:00
Rafael Weinstein b57377c1ed Chunk over value (non-type) serialization bytes (#2130)
Chunk over value (non-type) serialization bytes
2016-07-25 11:02:26 -07:00
Aaron Boodman cabc7aeb8c Emit more information when version check fails (#2145) 2016-07-24 22:34:30 -07:00
Aaron Boodman 4458091ad3 Update README.md 2016-07-24 18:27:27 -07:00
Aaron Boodman a23052a1dd csv-import: add flexibility to handling of numbers and booleans (#2141)
* Default empty csv cells to reasonable values.

It would probably be better to have more control over this, or even
better, some kind of 'null' value. But I think this is perfectly
reasonable initial behavior, and much more compatible with other
code.

* Support more spellings of "true" and "false"

* csv-import: provide more helpful value parse errors
2016-07-23 23:01:38 -07:00
Ben Kalman 270ba908cd Introduce samples/go/blob-get, utility which downloads a noms blob (#2127)
... from a noms database. Right now it's very slow (< 100kb/s).
2016-07-22 17:50:33 -07:00
Dan Willhite 27848fbe02 Merge pull request #2124 from willhite/work
Treat diffing of structs of different types, like maps
2016-07-22 15:37:12 -07:00
Dan Willhite c12402668a Treat diffing of structs of different types, like maps. (#2062) 2016-07-22 14:49:51 -07:00
Erik Arvidsson ed5f913014 JS: Fix cyclic dependency (#2129)
Lazily create valueCommitType too.
2016-07-22 14:00:33 -07:00
Ben Kalman b68f8eb309 Make diff depth first, fix error handling (#2125)
This fixes several diff-is-slow and log-is-slow bugs, and a bug where
diff was hanging in some error conditions.
2016-07-22 12:55:59 -07:00