Commit Graph

11 Commits

Author SHA1 Message Date
Chris Masone 7d8f599003 Remove implicit branching
This patch changes the "Head" of a DataStore to be a single Commit,
as opposed to a SetOfCommit. This has several consequences:

1) Commit() will only accept Commits that are descendants of the
   current Head.
2) Calls to Commit() can now fail, so the method now has an additional
   'ok' return value that callers must check. Whether ok is true or
   false, the DataStore struct returned is the right one to use for
   subsequent calls to Commit() -- retries or otherwise.
3) This rolls up the stack, so Dataset.Commit() can now fail as well,
   and similar logic applies.
4) sync.SetNewHeads() also behaves similarly, since it can also now fail.
5) Examples now die on Commit() failures.

Also, removes the /dataset endpoint from server. It's deprecated, and this
patch would have required updating it, so instead just delete it.

Towards issue #147
2015-08-24 11:48:03 -07:00
Aaron Boodman 214b37eccf Remove global imports of dbg package
Fixes #179
2015-08-08 23:57:37 -07:00
Aaron Boodman 9b2cbd8517 Add autogenerated $name field to structs 2015-08-05 18:43:47 -07:00
Erik Arvidsson e379360f3a Change the default names for typed data structures
TList -> ListOfT
TSet -> SetOfT
KeyValueMap -> MapOfKeyToValue

Issue #108
2015-07-23 14:12:06 -07:00
Aaron Boodman 39084cc0be Disambiguate the term "root".
datas.Root(Set) -> datas.Commit(Set)
DataStore::Roots() -> DataStore::Heads()
2015-07-22 14:43:36 -07:00
Erik Arvidsson 3fdc008f5c Codegen: Add support for noms types
This makes it possible to do a List of Bool or Map of Int32 etc
2015-07-22 12:24:27 -07:00
Aaron Boodman 2d8aed9753 Regenerate everything after change to map iteration order.
Fixes #62.
2015-07-20 09:29:51 -07:00
Aaron Boodman 4c521b6fa2 Rename _rungen.go to rungen.go everywhere because I'm an idiot 2015-07-15 13:55:17 -07:00
Aaron Boodman 82a87d548c Use go generate instead of custom thing for generating primitives 2015-07-10 10:39:31 -07:00
Aaron Boodman 2aa809e167 Move enc/* into types/*. 2015-07-09 17:30:43 -07:00
Chris Masone 748f75101f Change datastore package to be named datas
Because datastore is too long, and datas is reminiscent of chunks.

Resolves #8
2015-07-07 13:09:38 -07:00