Fixing broken build caused by changing return type of PullChunks

This commit is contained in:
Zach Musgrave
2019-03-18 17:23:58 -07:00
parent 48199e269f
commit 93e709d922

View File

@@ -4,6 +4,7 @@ import (
"errors"
"github.com/attic-labs/noms/go/datas"
"github.com/liquidata-inc/ld/dolt/go/libraries/doltcore/doltdb"
"github.com/liquidata-inc/ld/dolt/go/libraries/utils/pantoerr"
)
var ErrCantFF = errors.New("can't fast forward merge.")
@@ -17,7 +18,9 @@ func Push(branch, remoteBranch string, srcDB, destDB *doltdb.DoltDB, commit *dol
return ErrCantFF
}
err = destDB.PullChunks(srcDB, commit, progChan)
err = pantoerr.PanicToErrorNil("error pulling chunks", func() {
destDB.PullChunks(srcDB, commit, progChan)
})
if err != nil {
return err
@@ -35,7 +38,9 @@ func Push(branch, remoteBranch string, srcDB, destDB *doltdb.DoltDB, commit *dol
}
func Fetch(branch string, srcDB, destDB *doltdb.DoltDB, commit *doltdb.Commit, progChan chan datas.PullProgress) error {
err := destDB.PullChunks(srcDB, commit, progChan)
err := pantoerr.PanicToErrorNil("error pulling chunks", func() {
destDB.PullChunks(srcDB, commit, progChan)
})
if err != nil {
return err