stretchr has fixed a bug with the -count flag. I could merge these
changes into attic-labs, but it's easier to just use strechr.
We forked stretchr a long time ago so that we didn't link in the HTTP
testing libraries into the noms binaries (because we were using d.Chk in
production code). The HTTP issue doesn't seem to happen anymore, even
though we're still using d.Chk.
This makes it possible to include/exclude multiple directories when rolling src into a vendor directory.
For example, to roll the `cmd` and `go` directories from github.com/attic-labs/noms
into your vendor directory, you could run the following:
```
cd $MY_REPO_HOME
$NOMS/tools/roll.py --incl cmd --incl go https://github.com/attic-labs/noms
```
This patch also strips '.git' if it's present on the end of the repo url.
If you want to roll just the go/ directory of noms, you can do:
$ roll.py https://github.com/attic-labs/noms --incl go
If you want to roll the AWS SDK without the tests, you can do:
$ roll.py https://github.com/aws/aws-sdk-go --excl awstesting
This works with nested directories too, for example --incl go/util
--excl is evaluated after --incl, so you could exclude the perf/
directory of go/ if you really wanted:
$ roll.py https://github.com/attic-labs/noms --incl go --excl go/perf
Private databases begin with "/p/" - for example, "/kalman" is not
private, but "/p/kalman" is private. They are not the same database.
The bulk of this work is the receipt infrastructure.
A receipt is form data that gives access to a database, encrypted using
secretbox. For example, "Database=/p/kalman&Date=12345678" might encrypt
to "SFH5bcIJ3_XgEbtmi_AdCKTItW20fl90czVl5_pF5PAXhNQ366U1yOpYGAjT".
* A new tool receiptkey generates random receipt (secretbox) keys.
* A new tool receipttool generates receipts for databases.
* demo-server has been updated to check for a receipt in the
Authorization header to access private databases.
receipttool and demo-server must be given the same receipt key.
This puts the flow header after the copyright header.
It also:
* fixes the existing files to have valid headers
* Makes sure the script can handle doctype
* Introduce samples/js/dropbox/slurp
Doing the filter step will be a bit different because Dropbox does
not provide secret URLs for every photo by default. Requests have
to be oauth-authenticated so we'll have to figure out how to do
that.
* vendor golang.org/x/oauth2 and golang.org/x/net
* Introduce oauthify and modify dropbox/slurp to use
When the flag is present we force update @attic/noms. This is useful
since a lot of the samples use file: dependencies which lack a version
so they do not get updated as normal dependencies do.
This changes effectively:
> go test ./go/types/perf ./samples/csv/csv-import <etc>
to:
> go test ./go/types/perf <etc>
> go test ./samples/csv/csv-import <etc>
The perf results started going crazy when I started running a second
test package (./go/types/perf), this is one reason why it may have
happened. It's hard to say for sure what go test is doing.