You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ph...@apache.org on 2012/02/18 00:10:08 UTC

svn commit: r1245800 - in /subversion/trunk/subversion: libsvn_repos/log.c tests/cmdline/log_tests.py

Author: philip
Date: Fri Feb 17 23:10:08 2012
New Revision: 1245800

URL: http://svn.apache.org/viewvc?rev=1245800&view=rev
Log:
Followup to r1242958, fetch the kind for deleted nodes in pre-1.6
repositories.

* subversion/libsvn_repos/log.c
  (detect_changed): Follow history to get kind for deleted nodes
   in pre-1.6 repositories.

* subversion/tests/cmdline/log_tests.py
  (log_xml_old): Remove XFAIL.

Modified:
    subversion/trunk/subversion/libsvn_repos/log.c
    subversion/trunk/subversion/tests/cmdline/log_tests.py

Modified: subversion/trunk/subversion/libsvn_repos/log.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/log.c?rev=1245800&r1=1245799&r2=1245800&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/log.c (original)
+++ subversion/trunk/subversion/libsvn_repos/log.c Fri Feb 17 23:10:08 2012
@@ -268,7 +268,38 @@ detect_changed(apr_hash_t **changed,
       /* Pre-1.6 revision files don't store the change path kind, so fetch
          it manually. */
       if (item->node_kind == svn_node_unknown)
-        SVN_ERR(svn_fs_check_path(&item->node_kind, root, path, subpool));
+        {
+          svn_fs_root_t *check_root = root;
+          const char *check_path = path;
+
+          /* Deleted items don't exist so check earlier revision.  We
+             know the parent must exist and could be a copy */
+          if (change->change_kind == svn_fs_path_change_delete)
+            {
+              svn_fs_history_t *history;
+              svn_revnum_t prev_rev;
+              const char *parent_path, *name;
+
+              svn_fspath__split(&parent_path, &name, path, subpool);
+
+              SVN_ERR(svn_fs_node_history(&history, root, parent_path,
+                                          subpool));
+
+              /* Two calls because the first call returns the original
+                 revision as the deleted child means it is 'interesting' */
+              SVN_ERR(svn_fs_history_prev(&history, history, TRUE, subpool));
+              SVN_ERR(svn_fs_history_prev(&history, history, TRUE, subpool));
+
+              SVN_ERR(svn_fs_history_location(&parent_path, &prev_rev, history,
+                                              subpool));
+              SVN_ERR(svn_fs_revision_root(&check_root, fs, prev_rev, subpool));
+              check_path = svn_fspath__join(parent_path, name, subpool);
+            }
+
+          SVN_ERR(svn_fs_check_path(&item->node_kind, check_root, check_path,
+                                    subpool));
+        }
+
 
       if ((action == 'A') || (action == 'R'))
         {

Modified: subversion/trunk/subversion/tests/cmdline/log_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/log_tests.py?rev=1245800&r1=1245799&r2=1245800&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/log_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/log_tests.py Fri Feb 17 23:10:08 2012
@@ -2198,7 +2198,6 @@ def log_diff(sbox):
   compare_diff_output(r9diff, log_chain[1]['diff_lines'])
   compare_diff_output(r8diff, log_chain[2]['diff_lines'])
 
-@XFail()
 def log_xml_old(sbox):
   "log --xml shows kind for old style repository"