Reputation: 55
Currently trying to get the progress of a checkout from SharpSVN, right now, I'm using a backgroundWorker and adding a function to the SvnClients Progress event, but the "progress" reported by the event is not in 0-1 or 0-100 format. The final "progress" from checking out a repo is different depending on what I am assuming is the repository size. My current event is...
private void onSVNProgress(object sender, SvnProgressEventArgs e)
{
Debug.WriteLine(e.Progress);
totalProgeess += e.Progress;
}
is there a way to convert the progress that is passed from the event into 0-100?
Upvotes: 1
Views: 918
Reputation: 19612
The very simple answer: no. Subversion doesn't know how much it is going to transfer. Neither the server, nor the client does have the entire tree in memory and only the differences in the tree and a binary diff of the actual data are typically transferred. (In some cases checking out might download full files, but then compressed)
.Progress is typically just increasing inside an operation, so the += you use now is probably not what you want.
Upvotes: 1