You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by sv...@apache.org on 2019/12/04 04:00:30 UTC

svn commit: r1870786 - in /subversion/branches/1.13.x: ./ STATUS subversion/libsvn_client/info.c subversion/tests/cmdline/info_tests.py

Author: svn-role
Date: Wed Dec  4 04:00:30 2019
New Revision: 1870786

URL: http://svn.apache.org/viewvc?rev=1870786&view=rev
Log:
Merge the r1870393 group from trunk:

 * r1870393, r1870395
   Fix issue #4837 'Cannot get info for a file that was
   inside of file-replaced directory'.
   Justification:
     Regression introduced in 1.10.0.
   Votes:
     +1: julianfoad, rhuijben, jamessan

Modified:
    subversion/branches/1.13.x/   (props changed)
    subversion/branches/1.13.x/STATUS
    subversion/branches/1.13.x/subversion/libsvn_client/info.c
    subversion/branches/1.13.x/subversion/tests/cmdline/info_tests.py

Propchange: subversion/branches/1.13.x/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1870393,1870395

Modified: subversion/branches/1.13.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.13.x/STATUS?rev=1870786&r1=1870785&r2=1870786&view=diff
==============================================================================
--- subversion/branches/1.13.x/STATUS (original)
+++ subversion/branches/1.13.x/STATUS Wed Dec  4 04:00:30 2019
@@ -20,12 +20,3 @@ Veto-blocked changes:
 
 Approved changes:
 =================
-
- * r1870393, r1870395
-   Fix issue #4837 'Cannot get info for a file that was
-   inside of file-replaced directory'.
-   Justification:
-     Regression introduced in 1.10.0.
-   Votes:
-     +1: julianfoad, rhuijben, jamessan
-

Modified: subversion/branches/1.13.x/subversion/libsvn_client/info.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.13.x/subversion/libsvn_client/info.c?rev=1870786&r1=1870785&r2=1870786&view=diff
==============================================================================
--- subversion/branches/1.13.x/subversion/libsvn_client/info.c (original)
+++ subversion/branches/1.13.x/subversion/libsvn_client/info.c Wed Dec  4 04:00:30 2019
@@ -268,6 +268,7 @@ same_resource_in_head(svn_boolean_t *sam
                                     ctx, pool);
   if (err &&
       ((err->apr_err == SVN_ERR_CLIENT_UNRELATED_RESOURCES) ||
+       (err->apr_err == SVN_ERR_FS_NOT_DIRECTORY) ||
        (err->apr_err == SVN_ERR_FS_NOT_FOUND)))
     {
       svn_error_clear(err);

Modified: subversion/branches/1.13.x/subversion/tests/cmdline/info_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.13.x/subversion/tests/cmdline/info_tests.py?rev=1870786&r1=1870785&r2=1870786&view=diff
==============================================================================
--- subversion/branches/1.13.x/subversion/tests/cmdline/info_tests.py (original)
+++ subversion/branches/1.13.x/subversion/tests/cmdline/info_tests.py Wed Dec  4 04:00:30 2019
@@ -818,6 +818,32 @@ def info_item_failures(sbox):
     sbox.ospath('iota'))
 
 
+@Issue(4837)
+def info_file_in_file_replaced_dir(sbox):
+  "info, file in file-replaced dir"
+
+  sbox.build(empty=True)
+  sbox.simple_mkdir('dir')
+  sbox.simple_add_text('text\n', 'dir/file')
+  sbox.simple_commit(message='Add file')
+
+  sbox.simple_copy('dir/file', 'file-moved')
+  sbox.simple_rm('dir')
+  sbox.simple_add_text('replaced\n', 'dir')
+  sbox.simple_commit(message='Replace dir with file')
+
+  sbox.simple_update()
+
+  expected = {'Relative URL' : r'\^/dir/file',
+              'Node Kind' : 'file',
+              'Revision': '1',
+              'Last Changed Rev': '1',
+             }
+
+  svntest.actions.run_and_verify_info([expected],
+                                      sbox.repo_url + '/dir/file@1')
+
+
 ########################################################################
 # Run the tests
 
@@ -842,6 +868,7 @@ test_list = [ None,
               info_item_size_repos,
               info_item_size_repos_recursive,
               info_item_failures,
+              info_file_in_file_replaced_dir,
              ]
 
 if __name__ == '__main__':