Conversation
The IProgress implementations have an ErrorEncountered flag that is set when their WriteException or WriteError methods are called. But PushToTarget was only calling WriteMessageWithColor, so if the only exception during a Send/Receive was happening during the hg push step, then ErrorEncountered was incorrectly still false.
|
Note that this might change the output of any code that uses SIL.Windows.Forms.Progress.LogBox as the progress dialog, because LogBox writes a full exception stacktrace in its WriteException implementation, rather than just the exception message as the existing code was doing. If this matters, a possible fix would be |
|
@rmunn I refactored a tad:
I also added a test to demonstrate that. I kept the one fairly specific error message "Could not update the actual files after pushing to..." by wrapping it in an |
2ac3435 to
4b6df3d
Compare
jasonleenaylor
left a comment
There was a problem hiding this comment.
So there is one thing this PR does not take into account that I think does matter.
Previously if a client tried to sync to both USB and a resumeable server a failure in the remote server sync would not stop the usb sync. Now a failed sync on one source would block the other attempts.
@jasonleenaylor reviewed 3 files and all commit messages, and made 1 comment.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on rmunn).
|
You're right, I didn't think about that. It is already the case that a failure during the pull step will fail the entire sync. So, the only difference now is this quite precise case:
That seems reasonable to me. In summary, the options I see are:
(This would work fine for us and be the smallest change. It just seems semantically odd.)
|
| /// </summary> | ||
| private class PretendConnectableHttpRepositoryAddress : RepositoryAddress |
There was a problem hiding this comment.
I misinterpreted this name before reading the comment. Would FalseConnectableHttpRepositoryAddress or ConnectableButUnsyncableRepositoryAddress be clearer? But it's already a long name and is commented, so also fin as is.
|
Send/Receive is both a collaboration and a backup feature for some users. |
The IProgress implementations have an ErrorEncountered flag that is set when their WriteException or WriteError methods are called. But PushToTarget was only calling WriteMessageWithColor, so if the only exception during a Send/Receive was happening during the hg push step, then ErrorEncountered was incorrectly still false.
Fixes #366.
This change is