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
26b94cf816
Minor cleanup of noms diff code ( #2191 )
2016-07-28 16:55:37 -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
8330f3b7f3
Print closing brace for struct diff ( #2178 )
2016-07-27 17:36:14 -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
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
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
Dan Willhite
c12402668a
Treat diffing of structs of different types, like maps. ( #2062 )
2016-07-22 14:49:51 -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
Erik Arvidsson
68e92092e5
Commit type: Inner parents struct should also have meta
...
This changes so that all commit struct types have a meta field
(which might be an empty struct).
Increment the serialization version since the old data does not
necessarily have the meta field.
Fixes ##2112
2016-07-21 18:25:17 -07:00
Dan Willhite
4e1bbfcfa5
Simplify basic commit type for validation check
2016-07-21 12:30:36 -07:00
Dan Willhite
137e39d683
Add meta information to commits in cvs-import and url-fetch.
...
Add "meta" field to commit.
Change noms_log to print meta information when it exists.
Fixes #2012 .
2016-07-20 17:18:21 -07:00
Erik Arvidsson
00105d649e
Diff: We can never get nil as a Value ( #2108 )
...
...so remove the handling of that and panic.
2016-07-20 14:53:09 -07:00
Ben Kalman
74200673d4
Change sequence diff functions to be synchronous ( #2098 )
...
Currently they return immediately, but run internal goroutines which
stream results back on a channel. Now they must be run on their own
goroutine from outside the function.
This makes the code easier to reason about, and a future patch to write
a top-down and left-right multiplexing diff easier to write.
2016-07-20 13:20:17 -07:00
Dan Willhite
9931528c1b
Merge pull request #2096 from willhite/diff-flush
...
Flush() output from noms diff to ensure results are printed.
2016-07-19 16:29:00 -07:00
Dan Willhite
ac4472eed7
Flush() output from noms diff to ensure results are printed.
2016-07-19 16:27:50 -07:00
Erik Arvidsson
984fef226f
Change dataset CommitWithParents to Commit with options ( #2095 )
...
The new API is `ds.Commit(value, CommitOptions{Parents: p})`
Related to #2012
2016-07-19 14:30:59 -07:00
Erik Arvidsson
e2f261b142
Go: Compute commit type based on value and parents
...
We now compute the commit type based on the type of the value and
the type of the parents.
For the first commit we get:
```
struct Commit {
parents: Set<Ref<Cycle<0>>>,
value: T,
}
```
As long as we continue to commit values with type T that type stays
the same.
When we later commits a value of type U we get:
```
struct Commit {
parents: Set<Ref<struct Commit {
parents: Set<Ref<Cycle<0>>>,
value: T | U
}>>,
value: U,
}
```
The new type gets combined as a union type for the value of the inner
commit struct.
Fixes #1495
2016-07-18 14:28:56 -07:00
Erik Arvidsson
229c1708a2
Noms is a not a tool for *iterating* with Noms data ( #2078 )
...
Fixes #2051
2016-07-18 10:18:36 -07:00
mgedigian
e3a891bed7
Prevent sync crash when source is invalid ( #2002 )
...
* When sync source is not a valid object, report error without crashing.
Fixes #1983
2016-07-17 17:31:25 -07:00
Ben Kalman
534faa6b6d
exit noms as soon as less quits, not when stdout closes ( #2068 )
2016-07-15 10:10:57 -07:00
Ben Kalman
be463555f6
Add noms log -oneline option ( #2067 )
2016-07-14 16:58:16 -07:00
Mike Gray
4dd9415a1a
orderedSequenceDiff more like indexedSequenceDiff - parallel ( #1961 )
...
orderedSequenceDiff more like indexedSequenceDiff - parallel and working top-down rather than sequential
2016-07-12 17:57:26 -07:00
Erik Arvidsson
1507b8dd8f
Go: Change hash function to sha512
2016-07-12 13:59:08 -07:00
Mike Gray
b6f19dfea5
number encoding ( #1845 )
...
Moved to encoding Values of type Number as 2 varints.
2016-07-11 12:08:56 -07:00
Ben Kalman
c80be5c1ec
Formatting nits for noms sync progress ( #1985 )
2016-07-07 15:03:25 -07:00
Ben Kalman
f57353ea89
Include MB and MB/s in sync progress ( #1980 )
2016-07-06 16:26:13 -07:00
Ben Kalman
53b9ce3c1e
Add pull chunk progress to noms sync ( #1950 )
2016-07-06 15:01:32 -07:00
Aaron Boodman
6243ac01ce
Minor fixens to noms command UI ( #1978 )
2016-07-06 13:14:05 -07:00
Mike Gray
a7f29a716d
noms as one command line application, with version and help ( #1874 )
2016-07-06 15:38:25 -04:00
Aaron Boodman
1d752e3101
Update license: Noms will be copyright Attic Labs. ( #1976 )
2016-07-05 22:07:42 -07:00
Mike Gray
b2a4aa62b7
removing runtime.GOMAXPROCS calls ( #1947 )
2016-07-01 17:42:46 -04:00
Aaron Boodman
2921ca343c
Part 2: Move things that are not samples out of samples/go ( #1944 )
2016-07-01 11:58:26 -07:00
Aaron Boodman
2386afc7fb
Move stuff that is not samples out of samples directory ( #1943 )
...
* Move samples/go/*perf-reg to go/perf/
They aren't really samples.
* Move samples/go/util/check_error.go to go/d
* Remove samples/go/util/client_flags.go - unused
* remove httpcache.go - unused
* Remove samples/go/util/rungen.go - no generated code here anymore
* move NomsValueFromJSON to go/util/jsontonoms
2016-07-01 11:04:17 -07:00
Rafael Weinstein
6fc16866b4
you get a bufio. you get a bufio... ( #1938 )
...
you get a bufio. you get a bufio
2016-07-01 06:22:02 -07:00
Erik Arvidsson
40a2f661a7
Fix issue with missing size in expected diff output ( #1933 )
2016-06-29 14:20:10 -07:00
Mike Gray
7a1817d287
channels for orderedSequenceDiff ( #1926 )
2016-06-29 16:56:46 -04:00
Ben Kalman
038192cfcc
Make the spec package support types.Path ( #1920 )
2016-06-29 13:55:05 -07:00
Erik Arvidsson
0dc12c9e3d
HRS: Show the size of containers ( #1925 )
...
Fixes #1837
2016-06-28 17:04:08 -07:00
Rafael Weinstein
3a27e81a3e
Parallelize noms-log ( #1896 )
...
Parallelize noms-log
2016-06-25 13:06:28 -07:00
Rafael Weinstein
591093756c
Fix goroutine leak in list diff ( #1899 )
...
Cleanup goroutines in list diff when closed
2016-06-25 12:13:40 -07:00
Mike Gray
71d4f0eef7
list/indexed diff with go channel for response ( #1895 )
2016-06-23 17:32:07 -07:00
Dan Willhite
095d49fa84
New error handling.
2016-06-22 12:11:31 -07:00
Aaron Boodman
82b063a1f5
noms (diff|log|show): gracefully handle user specifying non-existent spec ( #1849 )
2016-06-20 17:47:47 -07:00
Dan Willhite
c00b3aeb72
Don't emit type info in diff. Fixes #1831
2016-06-16 14:04:46 -07:00
Aaron Boodman
d58d558548
Make types.String not cache ref ( #1836 )
...
Fixes https://github.com/attic-labs/noms/issues/1542
2016-06-16 07:04:28 -07:00
Dan Willhite
a3a78d695d
Add HeadValue() and MaybeHeadValue() to dataset.go and js equivalents
...
Fixes #1801 .
2016-06-15 11:16:25 -07:00