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