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

RE: svn commit: r1080253 - in /subversion/trunk/subversion/libsvn_wc: revision_status.c wc_db.c wc_db.h

From: Bert Huijben <bert_at_qqmail.nl>
Date: Thu, 10 Mar 2011 16:50:13 +0100

> -----Original Message-----
> From: stsp_at_apache.org [mailto:stsp_at_apache.org]
> Sent: donderdag 10 maart 2011 16:43
> To: commits_at_subversion.apache.org
> Subject: svn commit: r1080253 - in /subversion/trunk/subversion/libsvn_wc:
> revision_status.c wc_db.c wc_db.h
>
> Author: stsp
> Date: Thu Mar 10 15:43:22 2011
> New Revision: 1080253
>
> URL: http://svn.apache.org/viewvc?rev=1080253&view=rev
> Log:
> Move code detecting whether the working copy is switched from a given
> TRAIL_URL from svn_wc_revision_status2() into
> svn_wc__db_revision_status().
>
> * subversion/libsvn_wc/revision_status.c
> (svn_wc__db_revision_status2): Pass TRAIL_URL to
> svn_wc__db_revision_status(),
> instead of evaluating it here.
>
> * subversion/libsvn_wc/wc_db.c
> (svn_wc__db_revision_status): Accept TRAIL_URL argument, and use it
> to check whether the working copy is switched.
>
> * subversion/libsvn_wc/wc_db.h
> (svn_wc__db_revision_status): Update declaration and docstring.
>
> Modified:
> subversion/trunk/subversion/libsvn_wc/revision_status.c
> subversion/trunk/subversion/libsvn_wc/wc_db.c
> subversion/trunk/subversion/libsvn_wc/wc_db.h
>

<snip>

> Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_
> db.c?rev=1080253&r1=1080252&r2=1080253&view=diff
> ==========================================================
> ====================
> --- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
> +++ subversion/trunk/subversion/libsvn_wc/wc_db.c Thu Mar 10 15:43:22
> 2011
> @@ -9082,6 +9082,7 @@ svn_wc__db_revision_status(svn_revnum_t
> svn_boolean_t *is_switched,
> svn_wc__db_t *db,
> const char *local_abspath,
> + const char *trail_url,
> svn_boolean_t committed,
> apr_pool_t *scratch_pool)
> {
> @@ -9221,6 +9222,28 @@ svn_wc__db_revision_status(svn_revnum_t
> *is_switched = have_row;
> SVN_ERR(svn_sqlite__reset(stmt));
>
> + if (! *is_switched && trail_url != NULL)
> + {
> + const char *url;
> +
> + /* If the trailing part of the URL of the working copy directory
> + does not match the given trailing URL then the whole working
> + copy is switched. */
> + SVN_ERR(svn_wc__internal_node_get_url(&url, db, local_abspath,
> + scratch_pool, scratch_pool));

I don't think the DB api implementation should call into the higher layer APIs which abstract the DB api. Can you replace this call by one or more calls to the wc_db api?

        Bert
Received on 2011-03-10 16:50:45 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.