You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2010/06/10 14:17:54 UTC
svn commit: r953297 - in /subversion/branches/1.6.x: ./ CHANGES STATUS
subversion/libsvn_wc/adm_ops.c subversion/libsvn_wc/entries.c
subversion/libsvn_wc/tree_conflicts.c
Author: hwright
Date: Thu Jun 10 12:17:54 2010
New Revision: 953297
URL: http://svn.apache.org/viewvc?rev=953297&view=rev
Log:
Reintegrate the 1.6.x-issue3469 branch:
* r945708
Fix issue #3469 "tree conflict inside of directory external causes
assertion to fail".
Justification:
Assertion failures are bad and tree-conflicted externals cannot
be reverted or resolved without this fix.
Branch:
^/subversion/branches/1.6.x-issue3469
This is not a backport branch. The fix is for 1.6.x only.
Trunk will need a separate fix as part of wc-ng.
Votes:
+1: stsp, julianfoad, cmpilato
Modified:
subversion/branches/1.6.x/ (props changed)
subversion/branches/1.6.x/CHANGES (props changed)
subversion/branches/1.6.x/STATUS
subversion/branches/1.6.x/subversion/libsvn_wc/adm_ops.c
subversion/branches/1.6.x/subversion/libsvn_wc/entries.c
subversion/branches/1.6.x/subversion/libsvn_wc/tree_conflicts.c
Propchange: subversion/branches/1.6.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jun 10 12:17:54 2010
@@ -8,6 +8,7 @@
/subversion/branches/1.6.x-issue3390:907042-927863
/subversion/branches/1.6.x-issue3432:878598-924025
/subversion/branches/1.6.x-issue3443:878597-879480
+/subversion/branches/1.6.x-issue3469:945700-953293
/subversion/branches/1.6.x-issue3519:880376-889934
/subversion/branches/1.6.x-issue3573:906488-923765
/subversion/branches/1.6.x-issue3605:923668-923887
Propchange: subversion/branches/1.6.x/CHANGES
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jun 10 12:17:54 2010
@@ -8,6 +8,7 @@
/subversion/branches/1.6.x-issue3390/CHANGES:907042-927863
/subversion/branches/1.6.x-issue3432/CHANGES:878598-924025
/subversion/branches/1.6.x-issue3443/CHANGES:878597-879480
+/subversion/branches/1.6.x-issue3469/CHANGES:945700-953293
/subversion/branches/1.6.x-issue3519/CHANGES:880376-889934
/subversion/branches/1.6.x-issue3573/CHANGES:906488-923765
/subversion/branches/1.6.x-issue3605/CHANGES:923668-923887
Modified: subversion/branches/1.6.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x/STATUS?rev=953297&r1=953296&r2=953297&view=diff
==============================================================================
--- subversion/branches/1.6.x/STATUS (original)
+++ subversion/branches/1.6.x/STATUS Thu Jun 10 12:17:54 2010
@@ -242,16 +242,3 @@ Veto-blocked changes:
Approved changes:
=================
-
- * r945708
- Fix issue #3469 "tree conflict inside of directory external causes
- assertion to fail".
- Justification:
- Assertion failures are bad and tree-conflicted externals cannot
- be reverted or resolved without this fix.
- Branch:
- ^/subversion/branches/1.6.x-issue3469
- This is not a backport branch. The fix is for 1.6.x only.
- Trunk will need a separate fix as part of wc-ng.
- Votes:
- +1: stsp, julianfoad, cmpilato
Modified: subversion/branches/1.6.x/subversion/libsvn_wc/adm_ops.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x/subversion/libsvn_wc/adm_ops.c?rev=953297&r1=953296&r2=953297&view=diff
==============================================================================
--- subversion/branches/1.6.x/subversion/libsvn_wc/adm_ops.c (original)
+++ subversion/branches/1.6.x/subversion/libsvn_wc/adm_ops.c Thu Jun 10 12:17:54 2010
@@ -2198,13 +2198,23 @@ revert_internal(const char *path,
const svn_wc_entry_t *entry;
svn_wc_adm_access_t *dir_access;
svn_wc_conflict_description_t *tree_conflict;
+ svn_error_t *err;
/* Check cancellation here, so recursive calls get checked early. */
if (cancel_func)
SVN_ERR(cancel_func(cancel_baton));
/* Fetch the access baton for this path. */
- SVN_ERR(svn_wc_adm_probe_retrieve(&dir_access, parent_access, path, pool));
+ err = svn_wc_adm_probe_retrieve(&dir_access, parent_access, path, pool);
+ if (err && (err->apr_err == SVN_ERR_WC_NOT_LOCKED))
+ {
+ /* The path is unversioned, or it could be an external.
+ * Do not recurse into it. */
+ svn_error_clear(err);
+ return SVN_NO_ERROR;
+ }
+ else if (err)
+ return err;
/* Safeguard 1: the item must be versioned for any reversion to make sense,
except that a tree conflict can exist on an unversioned item. */
Modified: subversion/branches/1.6.x/subversion/libsvn_wc/entries.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x/subversion/libsvn_wc/entries.c?rev=953297&r1=953296&r2=953297&view=diff
==============================================================================
--- subversion/branches/1.6.x/subversion/libsvn_wc/entries.c (original)
+++ subversion/branches/1.6.x/subversion/libsvn_wc/entries.c Thu Jun 10 12:17:54 2010
@@ -3314,10 +3314,21 @@ svn_wc__walk_entries_and_tc(const char *
err = svn_wc_adm_probe_retrieve(&path_adm_access, adm_access, path, pool);
if (err && err->apr_err == SVN_ERR_WC_NOT_LOCKED)
{
- /* Item is unversioned and doesn't have a versioned parent so there is
- * nothing to walk. */
svn_error_clear(err);
- return SVN_NO_ERROR;
+
+ /* Hmmm... maybe the subdirectory is an external?
+ * Try to access the parent dir explicitly. */
+ err = svn_wc_adm_probe_retrieve(&path_adm_access, adm_access,
+ svn_path_dirname(path, pool), pool);
+ if (err && err->apr_err == SVN_ERR_WC_NOT_LOCKED)
+ {
+ /* Item is unversioned and doesn't have a versioned parent
+ * so there is nothing to walk. */
+ svn_error_clear(err);
+ return SVN_NO_ERROR;
+ }
+ else if (err)
+ return err;
}
else if (err)
return err;
Modified: subversion/branches/1.6.x/subversion/libsvn_wc/tree_conflicts.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x/subversion/libsvn_wc/tree_conflicts.c?rev=953297&r1=953296&r2=953297&view=diff
==============================================================================
--- subversion/branches/1.6.x/subversion/libsvn_wc/tree_conflicts.c (original)
+++ subversion/branches/1.6.x/subversion/libsvn_wc/tree_conflicts.c Thu Jun 10 12:17:54 2010
@@ -487,16 +487,41 @@ svn_wc__del_tree_conflict(const char *vi
apr_pool_t *pool)
{
svn_stringbuf_t *log_accum = NULL;
+ const char *parent_path;
+ svn_wc_adm_access_t *parent_adm_access;
+ svn_boolean_t parent_adm_access_is_temporary = FALSE;
+ svn_error_t *err;
- SVN_ERR(svn_wc__loggy_del_tree_conflict(&log_accum, victim_path, adm_access,
- pool));
+ parent_path = svn_path_dirname(victim_path, pool);
+ /* Try to get the parent's admin access baton from the baton set. */
+ err = svn_wc_adm_retrieve(&parent_adm_access, adm_access, parent_path,
+ pool);
+ if (err && (err->apr_err == SVN_ERR_WC_NOT_LOCKED))
+ {
+ svn_error_clear(err);
+ /* Try to access the parent dir independently.
+ * Maybe the victim is the root of a directory external,
+ * and the parent working copy isn't locked. */
+ SVN_ERR(svn_wc_adm_open3(&parent_adm_access, NULL, parent_path,
+ TRUE, 0, NULL, NULL, pool));
+ parent_adm_access_is_temporary = TRUE;
+ }
+ else if (err)
+ return err;
+
+ SVN_ERR(svn_wc__loggy_del_tree_conflict(&log_accum, victim_path,
+ parent_adm_access, pool));
if (log_accum != NULL)
{
- SVN_ERR(svn_wc__write_log(adm_access, 0, log_accum, pool));
- SVN_ERR(svn_wc__run_log(adm_access, NULL, pool));
+ SVN_ERR(svn_wc__write_log(parent_adm_access, 0, log_accum, pool));
+ SVN_ERR(svn_wc__run_log(parent_adm_access, NULL, pool));
}
+ /* If we opened a temporary admin access baton, close it. */
+ if (parent_adm_access_is_temporary)
+ SVN_ERR(svn_wc_adm_close2(parent_adm_access, pool));
+
return SVN_NO_ERROR;
}