-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
migrate repo verify to new cmds library. #4764
Conversation
c87bc16
to
045b524
Compare
License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
045b524
to
25b9603
Compare
|
||
buf := new(bytes.Buffer) | ||
if strings.Contains(obj.Msg, "was corrupt") { | ||
fmt.Fprintln(os.Stdout, obj.Msg) |
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 removed this distinction. Was it really necessary? (also, I assume this was supposed to print to stderr...)
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 was probably to be able to pipe just the corrupted blocks out into other command.
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'd guess this was mean to write to stderr as the normal output is written to stdout.
Do you intend for this to come before #4751? |
I don't see how they're related. Does that PR touch repo verify? I'm trying to bypass an issue I've noticed in the cmds lib backwards compatibility layer by simply migrating away from it as fast as possible (the |
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.
@Stebalien I am not sure about the stdout change, apart from that SGWM.
} | ||
|
||
Encoders: cmds.EncoderMap{ | ||
cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, obj *VerifyProgress) error { |
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.
Wait for ipfs/go-ipfs-cmds#65 to be fixed before merging.
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.
@Stebalien the linked issue has since been fixed, was this the only blocker for moving this forward?
|
||
buf := new(bytes.Buffer) | ||
if strings.Contains(obj.Msg, "was corrupt") { | ||
fmt.Fprintln(os.Stdout, obj.Msg) |
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'd guess this was mean to write to stderr as the normal output is written to stdout.
This was actually replaced by a newer PR (one rebased over a PR that parallelized the verification). Thanks for bumping this. |
License: MIT
Signed-off-by: Steven Allen steven@stebalien.com