[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] Sleep for timestamps in the right places

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Thu, 28 Mar 2013 19:48:00 +0000 (GMT)

The attached patch attempts to improve our 'sleep for timestamps' coverage, especially in error conditions where the WC has already been changed and so we should sleep as well as returning an error.  I just happened to notice that we currently miss several such cases. The are several TODO notes in the log message.  Before I go any further with this, can anybody check I'm on the right track? For easier reference, I'll repeat the log message here: [[[ Fix some sleep-for-timestamps code: avoid missing some cases where we need to sleep. Simplify by localizing the handling. TODO: Similarly fix and simplify the rest of the sleep_for_timestamps calls   in libsvn_client, which are in commit, copy, and merge. TODO: Decide whether 'sleep' should be called before or after releasing   the WC write lock, and fix where necessary to be consistent. TODO: In revert, only sleep if we actually revert something. TODO: In checkout (with --force), only sleep if we actually update something. TODO: Audit all other uses of 'goto' in Subversion for cases where we use   'if (err) goto ...' on some lines but accidentally use 'SVN_ERR' on others. * subversion/libsvn_client/client.h   (svn_client__update_internal,    svn_client__checkout_internal,    svn_client__switch_internal,    svn_client__handle_externals): Document that the 'sleep' output is set     even if the function returns an error, and don't let it be NULL.   (svn_client__export_externals): Remove the unused and unneeded 'sleep'     output parameter. * subversion/libsvn_client/export.c   (export_directory): Remove the unneeded 'sleep' variable. * subversion/libsvn_client/externals.c   (svn_client__export_externals): Remove the unused and unneeded 'sleep'     output parameter. * subversion/libsvn_client/checkout.c   (svn_client__checkout_internal): Rely on the caller to sleep even if we     throw an error.   (svn_client_checkout3): Handle the sleep here. * subversion/libsvn_client/switch.c   (switch_internal): Rely on the caller to sleep even if we throw an error.     It missed the case where externals handling fails.   (svn_client_switch3): Handle the sleep here. * subversion/libsvn_client/update.c   (update_internal): Rely on the caller to sleep even if we throw an error.     It missed the case where externals handling fails.   (svn_client_update4): Handle the sleep here in all cases. It missed the     case where, after updating at least one target, a subsequent target     fails. * subversion/libsvn_client/revert.c   (svn_client_revert2): Sleep even when returning an error. It missed the     case where, after reverting at least one target, a subsequent target     fails. ]]] - Julian -- Join WANdisco's free daily demo sessions on Scaling Subversion for the Enterprise <http://www.wandisco.com/training/webinars>

Received on 2013-03-28 20:48:36 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.