Commit Graph

28 Commits

Author SHA1 Message Date
Maximilian Hoffman
9a7a49f516 initial dolt backup cli (#2208)
* prototype

* backup pushes noms root

* backup pushes root value, basic restore still needs origin drop

* bats tests, no origin on restore, only head ref on restore

* cleanup code, up to date bats test

* make backup restore a root sync also, to catch branches and remote refs

* [ga-format-pr] Run go/utils/repofmt/format_repo.sh and go/Godeps/update.sh

* couple of tim's comments

couple of tim's comments

* zach's comments

* loosen restrictions for conflicting remote addresses

* [ga-format-pr] Run go/utils/repofmt/format_repo.sh and go/Godeps/update.sh

Co-authored-by: max-hoffman <max-hoffman@users.noreply.github.com>
2021-10-04 11:53:05 -07:00
Aaron Son
84c3066348 go/**/*.go: Update copyright headers for company name change. 2020-11-02 10:17:02 -08:00
Daylon Wilkins
b5bb663233 Reference new org name and updated trigger logic 2020-09-25 15:35:04 -07:00
Andy Arthur
a17914549d ugh parsing 2020-05-21 16:56:27 -05:00
Andy Arthur
7286431588 fixed help flag 2020-05-21 15:52:21 -05:00
Andy Arthur
c52d3bdc54 repo fmt 2020-05-21 14:59:35 -05:00
Andy Arthur
48533f66e4 updated parsing 2020-05-21 14:43:59 -05:00
Andy Arthur
b1cecda946 updated tests 2020-05-21 14:43:49 -05:00
Andy Arthur
85e94a2d7f better arg parsing 2020-05-20 18:16:34 -05:00
Andy Arthur
75b1044723 updated tests 2020-05-20 16:27:26 -05:00
Andy Arthur
f6ddadaa63 first pass at schema inferrence with typeinfo 2020-05-13 10:18:31 -07:00
Brian Hendriks
c8436c1721 Help Fix (#576) 2020-04-14 13:18:27 -07:00
Brian Hendriks
e3d42d5ee5 Multi DB (#517) 2020-04-09 15:07:52 -07:00
Brian Hendriks
7d89aec0d2 dumps docs (#301)
* refactor commands
* dump docs
2020-01-20 23:46:36 -08:00
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
Matt Jesuele
d2f5d9a592 go/libraries/utils/argparser/parser.go: Clean up Parse and fix handling of -- passed as commit spec 2019-10-24 13:58:32 -07:00
Aaron Son
5fc6fd5d6a go: Update for dolt at root of repository. 2019-07-24 10:28:54 -07:00
Aaron Son
23a0f5a33e Merge remote-tracking branch 'origin/master' into aaron/dolt-3pdeps-license-fetching 2019-07-23 16:07:50 -07:00
Aaron Son
6619700b5a dolt/go: Add utils/repofmt/check_fmt.sh, and standardize goimports config across repository. 2019-07-23 11:59:06 -07:00
Aaron Son
732086a9c7 dolt/go: Add copyright notices to every file. For files from noms, retain and reference the previous copyright notice as well. 2019-07-22 17:06:35 -07:00
Brian Hendriks
d49955d7bd dbfactory 2019-06-11 14:47:56 -07:00
Matt Jesuele
99df251ca9 dolt/go: Add branch -D flag as abbreviation for --delete --force 2019-04-03 11:11:31 -07:00
Zach Musgrave
5128323c45 Fixed panic on empty strings as arguments -- now just passed through to the command 2019-03-21 14:46:37 -07:00
Zach Musgrave
8164a2b238 Put struct docs above fields instead of next to them. 2019-03-12 16:10:09 -07:00
Zach Musgrave
7f03493bbd Added docs to parser methods and fixed a few errors constructing error strings. 2019-03-12 16:10:02 -07:00
Brian Hendriks
2f59fb8284 Bh/fix add field (#590)
* fix dolt schema --add-field
* bump version
2019-03-05 15:04:40 -08:00
Brian Hendriks
dd39c1dbbd fixed refactor (#254) 2019-01-09 13:37:06 -08:00
Brian Hendriks
dafab3984b Package refactor and document (#248) 2019-01-09 10:25:06 -08:00