You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2012/09/19 11:30:47 UTC
svn commit: r1387503 - /subversion/trunk/subversion/libsvn_wc/upgrade.c
Author: stsp
Date: Wed Sep 19 09:30:47 2012
New Revision: 1387503
URL: http://svn.apache.org/viewvc?rev=1387503&view=rev
Log:
* subversion/libsvn_wc/upgrade.c
(svn_wc__upgrade_conflict_skel_from_raw): We cannot use the
svn_wc__db_from_relpath() function here because it checks
the working copy format number against SVN_WC__VERSION.
During upgrades, this check will fail, causing a fatal error.
Instead, inline the equivalent of svn_wc__db_from_relpath(), which
is nothing more than an svn_dirent_join() to the wcroot path anyway.
Modified:
subversion/trunk/subversion/libsvn_wc/upgrade.c
Modified: subversion/trunk/subversion/libsvn_wc/upgrade.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/upgrade.c?rev=1387503&r1=1387502&r2=1387503&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/upgrade.c (original)
+++ subversion/trunk/subversion/libsvn_wc/upgrade.c Wed Sep 19 09:30:47 2012
@@ -1380,7 +1380,11 @@ svn_wc__upgrade_conflict_skel_from_raw(s
apr_pool_t *scratch_pool)
{
svn_skel_t *conflict_data = NULL;
+ const char *wcroot_abspath;
+ SVN_ERR(svn_wc__db_get_wcroot(&wcroot_abspath, db, wri_abspath,
+ scratch_pool, scratch_pool));
+
if (conflict_old || conflict_new || conflict_wrk)
{
const char *old_abspath = NULL;
@@ -1390,19 +1394,16 @@ svn_wc__upgrade_conflict_skel_from_raw(s
conflict_data = svn_wc__conflict_skel_create(result_pool);
if (conflict_old)
- SVN_ERR(svn_wc__db_from_relpath(&old_abspath, db, wri_abspath,
- conflict_old,
- scratch_pool, scratch_pool));
+ old_abspath = svn_dirent_join(wcroot_abspath, conflict_old,
+ scratch_pool);
if (conflict_new)
- SVN_ERR(svn_wc__db_from_relpath(&new_abspath, db, wri_abspath,
- conflict_new,
- scratch_pool, scratch_pool));
+ new_abspath = svn_dirent_join(wcroot_abspath, conflict_new,
+ scratch_pool);
if (conflict_wrk)
- SVN_ERR(svn_wc__db_from_relpath(&wrk_abspath, db, wri_abspath,
- conflict_wrk,
- scratch_pool, scratch_pool));
+ wrk_abspath = svn_dirent_join(wcroot_abspath, conflict_wrk,
+ scratch_pool);
SVN_ERR(svn_wc__conflict_skel_add_text_conflict(conflict_data,
db, wri_abspath,
@@ -1420,9 +1421,7 @@ svn_wc__upgrade_conflict_skel_from_raw(s
if (!conflict_data)
conflict_data = svn_wc__conflict_skel_create(result_pool);
- SVN_ERR(svn_wc__db_from_relpath(&prej_abspath, db, wri_abspath,
- prej_file,
- scratch_pool, scratch_pool));
+ prej_abspath = svn_dirent_join(wcroot_abspath, prej_file, scratch_pool);
SVN_ERR(svn_wc__conflict_skel_add_prop_conflict(conflict_data,
db, wri_abspath,
@@ -1445,9 +1444,8 @@ svn_wc__upgrade_conflict_skel_from_raw(s
tc_skel = svn_skel__parse(tree_conflict_data, tree_conflict_len,
scratch_pool);
- SVN_ERR(svn_wc__db_from_relpath(&local_abspath, db, wri_abspath,
- local_relpath,
- scratch_pool, scratch_pool));
+ local_abspath = svn_dirent_join(wcroot_abspath, local_relpath,
+ scratch_pool);
SVN_ERR(svn_wc__deserialize_conflict(&tc, tc_skel,
svn_dirent_dirname(local_abspath,