Files
dolt/go/libraries/utils/argparser
Katie McCulloch e609fa2bf7 dolt_docs feature branch (#222)
* Add Notes struct and some helper functions

* go/libraries/doltcore/env: Add Notes paths and create README and LICENSE on dolt init

* bats/no-repo.bats: Check that readme and license are created on init

* go/libraries/doltcore/env/notes.go: Let Notes key/val pairs be a map[string]string

* go/libraries/doltcore: Store notes on RootValue

* added license and readme to dolt status; merge on already existing repos not working

* fix merge for existing repos by using existing rootvals when notesMap is nil

* go/{cmd,libraries}: Use Doc instead of Note

* go/{cmd,libraries}: Move dolt docs to tableMap

* go/{cmd, libraries}: Get rid of abbreviation of Doc

* bats: Add comments for test where we rm LICENSE and README

* go/cmd/dolt/commands/status: Transform errors on  to get rid of panics

* go/libraries/dolctore/doltdb/root_val: Extract duplicate code in DocDiff to helper function

* go/libraries/doltcore: NewDocDiffs and root.DocDiff to take a slice of docs, easier to add docs in the future

* go/libraries/doltcore/env: Make Doc related env/path functions more general purpose that take in file name

* go/libraries/doltcore/actions: gofmt errors.go and minor update to defining docDetails

* go/libraries/doltcore/env/environment.go: Add PutDocsToWorking function

* go: Add docs to 'dolt add .' and update 'dolt status' to include staged docs

* bats: Add dolt doc tests and update comments where we rm <doc>

* go/libraries/doltcore/env/environment.go: Add generic functions to retrieve all or one valid docDetail(s)

* go: Pass specific docDetails for  to staged one PK at a time

* bats/dolt-docs.bats: dolt add <doc> for LICENSE.md and README.md

* bats/dolt-docs.bats: Remove fragile tests using  and use  instead

* go/libraries/doltcore: Break DocDiffs into helper functions and remove dereference to NewerText

* go/libraries/doltcore/env/environment: Extract updateExistingDocs and createDocsTable helper functions

* go/libraries/doltcore: Add RemoveDocsFromWorking so we unstage docs if stageTables encounters an error

* {bats,go}: Add test for adding invalid <table|doc>, simplify GetDocDiffs, and use PutDocsToWorking directly

* go/{cmd,libraries}: Implement dolt reset --hard, refactor dolt_docs.go env file for general use

* bats/dolt-docs.bats: Add dolt reset --hard tests for docs

* go/{cmd,libraries}: Implement soft reset for docs, make doltcore/env doc functions more general use

* bats/dolt-docs.bats: Add test coverage for soft reset of docs

* go/libraries/doltcore/env/environment.go: Extract PutDocsAndGetNewRoot function from PutDocsToWorking/PutDocsToStaged and use it in those functions

* {bats,go/cmd/dolt/commands/diff.go}: Add docs to working root before diffing, update tests

* {bats,go}: Print doc diffs

* {go,bats}: Print lines for deleted doc, and simplify doc diff printing

* Comitting output of ./Godeps/update.sh that was giving me error in ./Godeps/verify.sh

* {bats, go/libraries/doltcore/sqle/database.go: Remove DocTableName from sql commands

* go/{cmd,libraries}: Declare DoltNamespace and add HasDoltPrefix and FilterDoltInternalTables

* {go,bats}: Implement dolt diff <dic> by parsing docs from args, with bats test

* {go,bats}: Fix bug from commit #7b15ae8201083cbee57 that did not print deleted staged docs correctly

* rename docs test file: bats/dolt-docs.bats --> docs.bats

* go/{cmd,libraries/doltcore/env}: Implement dolt checkout <doc>

* bats/docs.bats: Add tests for dolt checkout <doc>

* Added test for branch, merge, and conflicts for dolt docs

* Actually Fixed weird space issue

* {go,bats}: Return error for dolt table *, schema *, ls, add, diff and reset command arguments that contain doltdb.DocTableName, with tests

* go/{cmd,libraries}: Remove pointer from type Docs and refactor resetHard to work with the change

* bats: 2 more tests for checkout

* SaveTrackedDocs for checkout, merge; still one skipped bats test

* go/{cmd,libraries}: Clean up doc checkout

* Simplify bats test docs.bats

* bats/docs.bats: simplify testing

* go/libraries/doltcore/doltdb/root_val_test.go: TestAddNewerTextAndValueToDocFromTbl

* go/libraries/dotlcore/doltdb/root_val: TestAddNewerTextAndDocPkFromRow

* simplify bats tests; remove run/status check where it is unneccesary

* Simplify bats test docs.bats

* libraries/doltcore/doltdb/root_val_test: TestDocDiff

* bats/docs.bats: Add newlines and notes to long test, remove comment

* {go,bats}: Stage tables and docs after successful merge with auto resolved conflicts

* go,{cmd,libraries}: Catch errors, return helpful doc error for checkout, add a comment

* cmd/dotl/commands/cnfcmds/resolve.go: Save docs in autoResolve and manualResolve instead of Resolve command function

* go/{cmd,libraries}: Refactor Checkout to handle docs explicitly

* bats/docs.bats: Add test coverage for checkout doc bug; still not working

* go/cmd/dolt/commands/status.go: Extract methods for retrieving lines of added, modified and removed not staged tbls and docs

* go: Move functions that Save docs to actions/docs.go

* go/cmd/dolt/commands/reset.go: Simplify RemoveDocsTbl helper fxn

* go/libraries/dotlcore/env/dolt_Docs.go: Use fs instead of os

* go/{cmd,libraries}: Simplify GetTblsDocsAndRootsForCheckout and add function comment

* gofmt-w

* go/{cmd,libraries}: Only use localDocs in actions/docs.go, and save docs where root has been updated

* go/cmd/dolt/commands/merge.go: Fail silently on updating staged root on merge

* go/cmd/dolt/commands: Move docsInCnfOnRoot to commands/status.go where it is being used

* go/{cmd,libraries}: Only use localDocs in actions/docs.go, and save docs where root has been updated

* go/cmd/dolt/commands/merge.go: Fail silently on updating staged root on merge

* go/cmd/dolt/commands: Move docsInCnfOnRoot to commands/status.go where it is being used

* bats/docs.bats: Add more test coverage for checkout

* go/{cmd,libraries}: Refactor Checkout command

* go/cmd/dolt/commands/merge.go: Remove silent fail, print message

* go/libraries/doltcore/env: Fix error that was deleting both untracked docs when only one was checked out

* go/{cmd,libraries}: Refactor Checkout command

* go/cmd/dolt/commands/merge.go: Remove silent fail, print message

* go/libraries/doltcore/env: Fix error that was deleting both untracked docs when only one was checked out

* Remove HasDoltPrefix from 2 checks that break create-view tests

* go/cmd/dolt/commands/checkout.go: Use HandleVErrAndExitCode, fix error msg when  is present, remove unneccessary verr declaration

* go/cmd/dolt/commands/checkout.go: Rename functions, return ref (not ref.String()) from getRemoteBranchRef

* Extract helper fxn getTblNotExistError, return NewTblNotExistError with bad table info

* go/cmd/dolt/commands/merge.go: Save docs in merge functions where roots are updated, add comment for UpdatedStagedWithVErr

* go/libraries/doltcore/env/actions: Move getupdatedWorkingAndStagedWithDocs to actions/docs.go

* Declare ctx := context.Background() at top of tests, use ctx throughout test

* Small improvement to AddValueToDocFromTbl, add comments to root_val_teset

* go/cmd/dolt/commands/checkout.go: Return verbose error rather than set variable and return later

* go/cmd/dolt/commands/checkout.go: Return verbose error from helper fxns in commands/checkout.go

* go/libraries/doltcore/env/actions/table.go: Remove err declaration from return params, declare err inline instead

* go/libraries/doltcore/env/actions/tables.go: Rename getTblNotExistError to validateTablesExist

Co-authored-by: Tim Sehn <tim@liquidata.co>
2020-01-17 10:50:15 -08:00
..
2020-01-17 10:50:15 -08:00