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

Re: [BUG] Data loss when committing a new file which is a target of multiple merges

From: Daniel Rall <dlr_at_collab.net>
Date: 2006-07-13 02:03:37 CEST

On Wed, 12 Jul 2006, Daniel Rall wrote:
> Garrett proposed trying to deal only with the timestamp issue. While
> I'm not particularly statisfied with the idea, I suggested the
> possibility of using svn_sleep_for_timestamps() as we do for other
> operations. Based I Philip's findings, I'm assuming we'd add this at
> the end of the 'merge' operation...

This patch deals with the timestamp issue identified by Philip. I'm
going to commit this to trunk (with a more exhaustive log message),
and propose it for backport to 1.4.x.

Note that similar code for some of our operations performs this wait
even when an error occurs. I'm assuming that that usually won't be
necessary here, but could be wrong.

(Kudos to the Release Manager for badgering me into looking at this. ;)

* subversion/libsvn_client/diff.c
  (do_merge, do_single_file_merge): Sleep until the next second.

Index: subversion/libsvn_client/diff.c
--- subversion/libsvn_client/diff.c (revision 20608)
+++ subversion/libsvn_client/diff.c (working copy)
@@ -37,6 +37,7 @@
 #include "svn_pools.h"
 #include "svn_config.h"
 #include "svn_props.h"
+#include "svn_time.h"
 #include "client.h"
 #include <assert.h>
@@ -1760,6 +1761,9 @@
   SVN_ERR(reporter->finish_report(report_baton, pool));
+ /* Sleep to ensure timestamp integrity. */
+ svn_sleep_for_timestamps();
   return SVN_NO_ERROR;
@@ -1898,6 +1902,9 @@
     return err;
+ /* Sleep to ensure timestamp integrity. */
+ svn_sleep_for_timestamps();
   if (merge_b->ctx->notify_func2)
       svn_wc_notify_t *notify

  • application/pgp-signature attachment: stored
Received on Thu Jul 13 02:04:21 2006

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.