-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cli: support DB restore from diff #991
Conversation
Codecov Report
@@ Coverage Diff @@
## master-2.x #991 +/- ##
===========================================
Coverage 67.97% 67.97%
===========================================
Files 145 145
Lines 14320 14320
===========================================
Hits 9734 9734
Misses 4126 4126
Partials 460 460 Continue to review full report at Codecov.
|
cli/server/server.go
Outdated
@@ -65,6 +65,10 @@ func NewCommands() []cli.Command { | |||
Name: "dump", | |||
Usage: "directory for storing JSON dumps", | |||
}, | |||
cli.BoolFlag{ | |||
Name: "diff", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Short form?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need it? We have dump
already, I think it will only add confusion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't have to be d
, but I really like having both long and short forms available.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Used -d
, because --dump
is used for debug only and can even be hidden.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, no, -d
is for debug
. -c
for "changeset" is also taken by --count
. And most of the words for "difference" are starting with either c
or d
. So I used k
.
Diff dumps provided by NGD contain index of the first block. Also do proper error handling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to port it to the master branch also (it's expected to have the same format).
Diff dumps provided by NGD contain index of the first block as a first item.
Also do proper error handling.