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 2012/02/05 03:13:44 UTC

svn commit: r1240654 - /subversion/trunk/subversion/libsvn_repos/reporter.c

Author: hwright
Date: Sun Feb  5 02:13:44 2012
New Revision: 1240654

URL: http://svn.apache.org/viewvc?rev=1240654&view=rev
Log:
Improve the value we provide to delete_entry() in the repos reporter.

This is a general correctness improvement, but also fixes a couple of test
failures in the Ev2 shims.

Current number of Ev2 test failures: 11

* subversion/libsvn_repos/reporter.c
  (update_entry): If we can't find the deleted revision, attempt to find a
    suitable value to provide for delete_entry().

Modified:
    subversion/trunk/subversion/libsvn_repos/reporter.c

Modified: subversion/trunk/subversion/libsvn_repos/reporter.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/reporter.c?rev=1240654&r1=1240653&r2=1240654&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/reporter.c (original)
+++ subversion/trunk/subversion/libsvn_repos/reporter.c Sun Feb  5 02:13:44 2012
@@ -898,6 +898,21 @@ update_entry(report_baton_t *b, svn_revn
       SVN_ERR(svn_repos_deleted_rev(svn_fs_root_fs(b->t_root), t_path,
                                     s_rev, b->t_rev, &deleted_rev,
                                     pool));
+
+      if (!SVN_IS_VALID_REVNUM(deleted_rev))
+        {
+          /* Two possibilities: either the thing doesn't exist in S_REV; or
+             it wasn't deleted between S_REV and B->T_REV.  In the first case,
+             I think we should leave DELETED_REV as SVN_INVALID_REVNUM, but
+             in the second, it should be set to B->T_REV-1 for the call to
+             delete_entry() below. */
+          svn_node_kind_t kind;
+
+          SVN_ERR(svn_fs_check_path(&kind, b->t_root, t_path, pool));
+          if (kind != svn_node_none)
+            deleted_rev = b->t_rev - 1;
+        }
+
       SVN_ERR(b->editor->delete_entry(e_path, deleted_rev, dir_baton,
                                       pool));
       s_path = NULL;