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

Re: svn commit: r953617 - in /subversion/trunk/subversion/libsvn_wc: merge.c props.c wc-queries.sql wc_db.c wc_db.h workqueue.c workqueue.h

From: Greg Stein <gstein_at_gmail.com>
Date: Fri, 11 Jun 2010 05:29:27 -0400

On Fri, Jun 11, 2010 at 05:11, <rhuijben_at_apache.org> wrote:
>...
> +++ subversion/trunk/subversion/libsvn_wc/merge.c Fri Jun 11 09:11:14 2010
>...
> @@ -727,18 +726,16 @@ preserve_pre_merge_files(svn_skel_t **wo
>                                         target_abspath, result_pool));
>   *work_items = svn_wc__wq_merge(*work_items, work_item, result_pool);
>
> -  tmp_entry.conflict_old = svn_dirent_is_child(dir_abspath, left_copy, pool);
> -  tmp_entry.conflict_new = svn_dirent_is_child(dir_abspath, right_copy, pool);
> -  tmp_entry.conflict_wrk = svn_dirent_basename(target_copy, pool);
> -
>   /* Mark TARGET_ABSPATH's entry as "Conflicted", and start tracking
>      the backup files in the entry as well. */
> -  SVN_ERR(svn_wc__loggy_entry_modify(&work_item, db, dir_abspath,
> -                                     target_abspath, &tmp_entry,
> -                                     SVN_WC__ENTRY_MODIFY_CONFLICT_OLD
> -                                       | SVN_WC__ENTRY_MODIFY_CONFLICT_NEW
> -                                       | SVN_WC__ENTRY_MODIFY_CONFLICT_WRK,
> -                                     result_pool));
> +  SVN_ERR(svn_wc__wq_tmp_build_set_text_conflict_markers(
> +                    &work_item,
> +                    db, target_abspath,
> +                    svn_dirent_is_child(dir_abspath, left_copy, pool),
> +                    svn_dirent_is_child(dir_abspath, right_copy, pool),
> +                    svn_dirent_basename(target_copy, pool),
> +                    pool, pool));

result_pool, scratch_pool

>...
> +++ subversion/trunk/subversion/libsvn_wc/wc-queries.sql Fri Jun 11 09:11:14 2010
> @@ -215,6 +215,29 @@ insert into actual_node (
>   wc_id, local_relpath, tree_conflict_data)
>  values (?1, ?2, ?3);
>
> +-- STMT_UPDATE_ACTUAL_TEXT_CONFLICTS
> +update actual_node set conflict_old = ?3, conflict_new = ?4,
> +conflict_working = ?5
> +where wc_id = ?1 and local_relpath = ?2;
> +
> +-- STMT_INSERT_ACTUAL_TEXT_CONFLICTS
> +/* tree conflicts are always recorded on the wcroot node, so the
> +   parent_relpath will be null.  */
> +insert into actual_node (
> +  wc_id, local_relpath, conflict_old, conflict_new, conflict_working)
> +values (?1, ?2, ?3, ?4, ?5);

tree conflicts, yes. but these are NOT tree conflicts. the
parent_relpath may need to be "" instead of null.

> +
> +-- STMT_UPDATE_ACTUAL_PROPERTY_CONFLICTS
> +update actual_node set prop_reject = ?3
> +where wc_id = ?1 and local_relpath = ?2;
> +
> +-- STMT_INSERT_ACTUAL_PROPERTY_CONFLICTS
> +/* tree conflicts are always recorded on the wcroot node, so the
> +   parent_relpath will be null.  */
> +insert into actual_node (
> +  wc_id, local_relpath, prop_reject)
> +values (?1, ?2, ?3);

same

>...
> +++ subversion/trunk/subversion/libsvn_wc/wc_db.c Fri Jun 11 09:11:14 2010
> @@ -8169,3 +8169,99 @@ svn_wc__db_temp_op_remove_working_stub(s
>
>   return svn_error_return(svn_sqlite__step_done(stmt));
>  }
> +
> +svn_error_t *
> +svn_wc__db_temp_op_set_text_conflict_marker_files(svn_wc__db_t *db,
> +                                                  const char *local_abspath,
> +                                                  const char *old_basename,
> +                                                  const char *new_basename,
> +                                                  const char *wrk_basename,
> +                                                  apr_pool_t *scratch_pool)
> +{
> +  svn_wc__db_pdh_t *pdh;
> +  const char *local_relpath;
> +  svn_sqlite__stmt_t *stmt;
> +  svn_boolean_t got_row;
> +
> +  SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
> +
> +  SVN_ERR(svn_wc__db_pdh_parse_local_abspath(&pdh, &local_relpath, db,
> +                                             local_abspath,
> +                                             svn_sqlite__mode_readwrite,
> +                                             scratch_pool, scratch_pool));
> +  VERIFY_USABLE_PDH(pdh);
> +
> +  SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
> +                                    STMT_SELECT_ACTUAL_NODE));
> +  SVN_ERR(svn_sqlite__bindf(stmt, "is", pdh->wcroot->wc_id, local_relpath));
> +
> +  SVN_ERR(svn_sqlite__step(&got_row, stmt));
> +  SVN_ERR(svn_sqlite__reset(stmt));
> +
> +  if (got_row)
> +    {
> +      SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
> +                                        STMT_UPDATE_ACTUAL_TEXT_CONFLICTS));
> +    }
> +  else
> +    {
> +      SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
> +                                        STMT_INSERT_ACTUAL_TEXT_CONFLICTS));
> +    }

there should be a comment in here somewhere that these two statements
"should" be in a transaction, but we're keeping it simple since they
are temporary operations.

>...
> +                                             svn_sqlite__mode_readwrite,
> +                                             scratch_pool, scratch_pool));
> +  VERIFY_USABLE_PDH(pdh);
> +
> +  SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
> +                                    STMT_SELECT_ACTUAL_NODE));
> +  SVN_ERR(svn_sqlite__bindf(stmt, "is", pdh->wcroot->wc_id, local_relpath));
> +
> +  SVN_ERR(svn_sqlite__step(&got_row, stmt));
> +  SVN_ERR(svn_sqlite__reset(stmt));
> +
> +  if (got_row)
> +    {
> +      SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
> +                                        STMT_UPDATE_ACTUAL_PROPERTY_CONFLICTS));
> +    }
> +  else
> +    {
> +      SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
> +                                        STMT_INSERT_ACTUAL_PROPERTY_CONFLICTS));
> +    }

Same, re: transaction.

>...

Cheers,
-g
Received on 2010-06-11 11:30:05 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.