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

Re: [PATCH] Factor out test repo creation func - help needed

From: Julian Foad <julian.foad_at_wandisco.com>
Date: Tue, 31 May 2011 14:45:56 +0100

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.
Received on 2011-05-31 15:46:37 CEST

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.