You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2011/05/26 15:07:59 UTC
svn commit: r1127895 -
/subversion/trunk/subversion/tests/libsvn_wc/entries-compat.c
Author: julianfoad
Date: Thu May 26 13:07:59 2011
New Revision: 1127895
URL: http://svn.apache.org/viewvc?rev=1127895&view=rev
Log:
* subversion/tests/libsvn_wc/entries-compat.c
(make_one_db, create_fake_wc): Use abspaths instead of relpaths. Pass the
WC root path rather than the .svn path from the latter to the former.
Modified:
subversion/trunk/subversion/tests/libsvn_wc/entries-compat.c
Modified: subversion/trunk/subversion/tests/libsvn_wc/entries-compat.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_wc/entries-compat.c?rev=1127895&r1=1127894&r2=1127895&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_wc/entries-compat.c (original)
+++ subversion/trunk/subversion/tests/libsvn_wc/entries-compat.c Thu May 26 13:07:59 2011
@@ -38,11 +38,13 @@
#include "svn_pools.h"
#include "svn_wc.h"
-#include "../../include/private/svn_sqlite.h"
+#include "private/svn_sqlite.h"
#include "../../libsvn_wc/wc.h"
#include "../../libsvn_wc/wc-queries.h"
#include "../../libsvn_wc/wc_db.h"
+#define SVN_WC__I_AM_WC_DB
+#include "../../libsvn_wc/wc_db_private.h"
#include "../svn_test.h"
@@ -304,19 +306,22 @@ WC_QUERIES_SQL_DECLARE_STATEMENTS(statem
static svn_error_t *
-make_one_db(const char *dirpath,
+make_one_db(const char *wc_abspath,
const char * const my_statements[],
apr_pool_t *scratch_pool)
{
- const char *dbpath = svn_dirent_join(dirpath, "wc.db", scratch_pool);
+ const char *dotsvn_abspath = svn_dirent_join(wc_abspath, ".svn",
+ scratch_pool);
+ const char *db_abspath = svn_dirent_join(dotsvn_abspath, "wc.db",
+ scratch_pool);
svn_sqlite__db_t *sdb;
int i;
/* Create fake-wc/SUBDIR/.svn/ for placing the metadata. */
- SVN_ERR(svn_io_make_dir_recursively(dirpath, scratch_pool));
+ SVN_ERR(svn_io_make_dir_recursively(dotsvn_abspath, scratch_pool));
- svn_error_clear(svn_io_remove_file(dbpath, scratch_pool));
- SVN_ERR(svn_sqlite__open(&sdb, dbpath, svn_sqlite__mode_rwcreate,
+ svn_error_clear(svn_io_remove_file(db_abspath, scratch_pool));
+ SVN_ERR(svn_sqlite__open(&sdb, db_abspath, svn_sqlite__mode_rwcreate,
my_statements,
0, NULL,
scratch_pool, scratch_pool));
@@ -332,7 +337,7 @@ static svn_error_t *
create_fake_wc(const char *subdir, int format, apr_pool_t *scratch_pool)
{
const char *root;
- const char *dirpath;
+ const char *wc_abspath;
const char * const my_statements[] = {
statements[STMT_CREATE_SCHEMA],
statements[STMT_CREATE_NODES],
@@ -352,11 +357,11 @@ create_fake_wc(const char *subdir, int f
SVN_ERR(svn_io_remove_dir2(root, TRUE, NULL, NULL, scratch_pool));
- dirpath = svn_dirent_join(root, ".svn", scratch_pool);
- SVN_ERR(make_one_db(dirpath, my_statements, scratch_pool));
+ SVN_ERR(svn_dirent_get_absolute(&wc_abspath, root, scratch_pool));
+ SVN_ERR(make_one_db(wc_abspath, my_statements, scratch_pool));
- dirpath = svn_dirent_join_many(scratch_pool, root, "M", ".svn", NULL);
- SVN_ERR(make_one_db(dirpath, M_statements, scratch_pool));
+ wc_abspath = svn_dirent_join(wc_abspath, "M", scratch_pool);
+ SVN_ERR(make_one_db(wc_abspath, M_statements, scratch_pool));
return SVN_NO_ERROR;
}
Re: svn commit: r1127895 -
/subversion/trunk/subversion/tests/libsvn_wc/entries-compat.c
Posted by Julian Foad <ju...@wandisco.com>.
On Thu, 2011-05-26 at 09:32 -0400, Greg Stein wrote:
> On May 26, 2011 9:30 AM, "Greg Stein" <gs...@gmail.com> wrote:
> >
> >
> > On May 26, 2011 9:08 AM, <ju...@apache.org> wrote:
> > >...
> >
> > > #include "../../libsvn_wc/wc.h"
> > > #include "../../libsvn_wc/wc-queries.h"
> > > #include "../../libsvn_wc/wc_db.h"
> > > +#define SVN_WC__I_AM_WC_DB
> > > +#include "../../libsvn_wc/wc_db_private.h"
> >
> > No you're not :-)
> >
> > Why is that present?
>
> Ah. Next revision.
I've edited the log msg to mention this mistake now.
- Julian
Re: svn commit: r1127895 - /subversion/trunk/subversion/tests/libsvn_wc/entries-compat.c
Posted by Greg Stein <gs...@gmail.com>.
On May 26, 2011 9:30 AM, "Greg Stein" <gs...@gmail.com> wrote:
>
>
> On May 26, 2011 9:08 AM, <ju...@apache.org> wrote:
> >...
>
> > #include "../../libsvn_wc/wc.h"
> > #include "../../libsvn_wc/wc-queries.h"
> > #include "../../libsvn_wc/wc_db.h"
> > +#define SVN_WC__I_AM_WC_DB
> > +#include "../../libsvn_wc/wc_db_private.h"
>
> No you're not :-)
>
> Why is that present?
Ah. Next revision.
Re: svn commit: r1127895 - /subversion/trunk/subversion/tests/libsvn_wc/entries-compat.c
Posted by Greg Stein <gs...@gmail.com>.
On May 26, 2011 9:08 AM, <ju...@apache.org> wrote:
>...
> #include "../../libsvn_wc/wc.h"
> #include "../../libsvn_wc/wc-queries.h"
> #include "../../libsvn_wc/wc_db.h"
> +#define SVN_WC__I_AM_WC_DB
> +#include "../../libsvn_wc/wc_db_private.h"
No you're not :-)
Why is that present?
Cheers,
-g