I don't care much for the UI that results from this patch, but I figured I'd
post it here in case someone else is interesting in running with it.
<<<
Add fractional progress reporting to 'svnsync sync'. This results in
output like the following:
Committed revision 21 [1/10].
Copied properties for revision 21.
Committed revision 22 [2/10].
Copied properties for revision 22.
...
Copied properties for revision 28.
Committed revision 29 [9/10].
Copied properties for revision 29.
Committed revision 30 [10/10].
Copied properties for revision 30.
>>>
--
C. Michael Pilato <cmpilato@collab.net>
CollabNet <> www.collab.net <> Distributed Development On Demand
Index: subversion/svnsync/main.c
===================================================================
--- subversion/svnsync/main.c (revision 23751)
+++ subversion/svnsync/main.c (working copy)
@@ -900,6 +900,8 @@
svn_ra_callbacks2_t *sync_callbacks;
const char *to_url;
svn_revnum_t committed_rev;
+ int num_commits;
+ int target_num_commits;
} sync_baton_t;
@@ -911,12 +913,11 @@
{
sync_baton_t *sb = baton;
- SVN_ERR(svn_cmdline_printf(pool, _("Committed revision %ld.\n"),
- commit_info->revision));
-
+ sb->num_commits++;
sb->committed_rev = commit_info->revision;
-
- return SVN_NO_ERROR;
+ return svn_cmdline_printf(pool, _("Committed revision %ld [%d/%d].\n"),
+ commit_info->revision, sb->num_commits,
+ sb->target_num_commits);
}
@@ -1084,7 +1085,8 @@
/* Ok, so there are new revisions, iterate over them copying them
into the destination repository. */
-
+ baton->target_num_commits = (int)(from_latest - atol(last_merged_rev->data));
+ baton->num_commits = 0;
for (current = atol(last_merged_rev->data) + 1;
current <= from_latest;
++current)
Received on Mon Mar 12 15:16:58 2007