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

[PATCH] verify at each commit

From: Daniel Shahaf <danielsh_at_elego.de>
Date: Wed, 27 Mar 2013 00:11:51 +0200

[[[
Run the per-revision verify code on a transaction just before it becomes
a revision. The intent is to catch corruption bugs as early as possible.

* subversion/libsvn_fs/fs-loader.c
  (svn_fs_commit_txn): As above.
]]]

[[[
Index: subversion/libsvn_fs/fs-loader.c
===================================================================
--- subversion/libsvn_fs/fs-loader.c (revision 1461335)
+++ subversion/libsvn_fs/fs-loader.c (working copy)
@@ -761,6 +761,11 @@ svn_fs_commit_txn(const char **conflict_p, svn_rev
   fs_path = svn_fs_path(fs, pool);
 #endif
 
+#ifdef SVN_DEBUG
+ /* Verify. */
+ SVN_ERR(svn_fs_verify_rev(fs, txn_root, pool));
+#endif
+
   err = txn->vtable->commit(conflict_p, new_rev, txn, pool);
 
 #ifdef SVN_DEBUG
]]]

Maybe this should be optional behaviour in release mode, too?
Received on 2013-03-26 23:12:33 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.