On Sat, Feb 28, 2009 at 10:12 PM, Greg Stein <gstein_at_gmail.com> wrote:
> Log:
> Implement a new function, svn_wc__db_scan_working(), to scan up the
> WORKING tree to refine the status of a node in a WORKING tree. The
> function will also return all the details of the operation which created
> the target node.
>
> A slight change was made to the schema for recording moves (as opposed to
> copies). The source of a move did not have enough information, so we now
> use the copyfrom_* fields and record a boolean for that information. This
> is similar to the APIs in wc_db which talk about "original" locations of
> nodes, rather than "copyfrom" locations. The schema will be renamed in a
> future revision.
>
> @@ -2332,22 +2275,232 @@ svn_wc__db_scan_base_repos(const char **
>
>
> svn_error_t *
> -svn_wc__db_scan_added_repos(const char **repos_relpath,
> - const char **repos_root_url,
> - const char **repos_uuid,
> - svn_wc__db_t *db,
> - const char *local_abspath,
> - apr_pool_t *result_pool,
> - apr_pool_t *scratch_pool)
> +svn_wc__db_scan_working(svn_wc__db_status_t *status,
> + const char **op_root_abspath,
> + const char **repos_relpath,
> + const char **repos_root_url,
> + const char **repos_uuid,
> + const char **original_repos_relpath,
> + const char **original_root_url,
> + const char **original_uuid,
> + svn_revnum_t *original_revision,
> + const char **moved_to_abspath,
> + svn_wc__db_t *db,
> + const char *local_abspath,
> + apr_pool_t *result_pool,
> + apr_pool_t *scratch_pool)
> {
[snip]
> + /* Record information from the starting node. */
> + if (current_abspath == local_abspath)
> + {
> + start_status = word_to_presence(svn_sqlite__column_text(stmt, 0,
> + NULL));
Hi Greg,
Just a question: does we trust to SQLite that field marked as not null
in sql schema *never* return null like in code before? How this will
work if we tweak schema?
> + if (start_status == svn_wc__db_status_normal)
> + start_status = svn_wc__db_status_added;
> + else
> + start_status = svn_wc__db_status_deleted;
> +
> + /* Provide the default status; we'll override as appropriate. */
> + if (status)
> + *status = start_status;
> + }
> + else if (start_status == svn_wc__db_status_deleted
> + && strcmp("normal",
> + svn_sqlite__column_text(stmt, 0, NULL)) == 0)
And here too.
--
Ivan Zhakov
VisualSVN Team
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1246864
Received on 2009-02-28 23:26:52 CET