Implement Pipeline.Dump

Signed-off-by: Solomon Hykes <solomon@docker.com>
Small cleanup of pipeline.go

Signed-off-by: Solomon Hykes <solomon@docker.com>
Pipeline.OnRun can be used to set a custom run handler

This is a requirement for clean transactions in DB. The result will be
awesome.

Signed-off-by: Solomon Hykes <solomon@docker.com>
concat() concatenates 2 pipelines

Signed-off-by: Solomon Hykes <solomon@docker.com>
Small Tree methods: Hash, Free, List

Signed-off-by: Solomon Hykes <solomon@docker.com>
Repo.DB can generate a unique DB name as a convenience

Signed-off-by: Solomon Hykes <solomon@docker.com>
Temporarily disable GetTar and SetTar

Signed-off-by: Solomon Hykes <solomon@docker.com>
Fix typo in Tree.Diff prototype

Signed-off-by: Solomon Hykes <solomon@docker.com>
Simpler implementation of Tree.Pipeline

Signed-off-by: Solomon Hykes <solomon@docker.com>
Tree.addGitObj expects OID as a string

Signed-off-by: Solomon Hykes <solomon@docker.com>
New transaction and query system

* Powerful chainable queries and transactions, built on pipelines
* Convenience methods for one-off basic operations: Get, Set, Mkdir, Delete etc.

This required various API changes and cleanup:

* Move Push and Pull to Repository for clarity
* DB.Tree() is deprecated by DB.Query().Run()
* DB.Name() returns the name of the database
* Remove dead code in DB: lookupTree, Watch, Commit
* Fix a few typos

Signed-off-by: Solomon Hykes <solomon@docker.com>
Pipeline.List and Pipeline.Get

These are convenience functions to allow getting or listing values
straight from the output of a pipeline, without the intermediary
call to Run() with error checking.

Signed-off-by: Solomon Hykes <solomon@docker.com>
Pipeline.AssertEq and Pipeline.AssertNotExist

These pipeline steps can be used to make an assertion at a certain point
of the pipeline. If the assertion fails, the pipeline fails.

* AssertEq asserts that Get(key) == value
* AssertNotExist asserts that Get(key) returns a "does not exist" error

Among other uses, this can be used to simplify the test suite.

Signed-off-by: Solomon Hykes <solomon@docker.com>
The tests compile, but still fail

Signed-off-by: Solomon Hykes <solomon@docker.com>