On Fri, 2011-05-27 at 21:27 +0100, Julian Foad wrote:
> In preparation for installing temp triggers for DB validation, I'm
> trying to do a simple factoring-out of a WC DB creation func, but it's
> failing.  I'm out of time now so if anybody wants to debug for me please
> feel free!
> 
> Error on running db-test 1 (and others) is:
> subversion/libsvn_wc/wc_db_wcroot.c:247: (apr_err=235000)
> svn: E235000: In file 'subversion/libsvn_wc/wc_db_wcroot.c' line 247:
> assertion failed (format >= 1)

Solved.

The problem was I had moved the function into a different source file
(utils.c) that did not include "wc.h", so when it includes
"wc-queries.h" one of the db creation statements says "pragma
user_version = SVN_WC__VERSION" instead of "pragma user_version = 29".
That pragma sets user_version to 0 and doesn't raise an error.

- Julian


> Factor out a test function for creating a fake WC DB.
> 
> ### Not working: db-test fails with:
> subversion/libsvn_wc/wc_db_wcroot.c:247: (apr_err=235000)
> svn: E235000: In file 'subversion/libsvn_wc/wc_db_wcroot.c' line 247: 
> assertion failed (format >= 1)
> 
> * subversion/tests/libsvn_wc/utils.h,
>   subversion/tests/libsvn_wc/utils.c
>   (svn_test__create_fake_wc): New function, factored out from two places.


Reply via email to