subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1702203 - in /subversion/trunk/subversion: libsvn_wc/wc_db_pristine.c tests/cmdline/update_tests.py
Date Thu, 10 Sep 2015 10:02:05 GMT
Author: rhuijben
Date: Thu Sep 10 10:02:05 2015
New Revision: 1702203

URL: http://svn.apache.org/r1702203
Log:
Following up on r1701838, improve error reporting and add regression test,
including on 'svn cleanup' resolving the problem.

* subversion/libsvn_wc/wc_db_pristine.c
  (svn_wc__db_pristine_prepare_install): Wrap error message.

* subversion/tests/cmdline/update_tests.py
  (missing_tmp_update): New test.
  (test_list): Add test.

Modified:
    subversion/trunk/subversion/libsvn_wc/wc_db_pristine.c
    subversion/trunk/subversion/tests/cmdline/update_tests.py

Modified: subversion/trunk/subversion/libsvn_wc/wc_db_pristine.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db_pristine.c?rev=1702203&r1=1702202&r2=1702203&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db_pristine.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db_pristine.c Thu Sep 10 10:02:05 2015
@@ -381,9 +381,10 @@ svn_wc__db_pristine_prepare_install(svn_
   *install_data = apr_pcalloc(result_pool, sizeof(**install_data));
   (*install_data)->wcroot = wcroot;
 
-  SVN_ERR(svn_stream__create_for_install(stream,
-                                         temp_dir_abspath,
-                                         result_pool, scratch_pool));
+  SVN_ERR_W(svn_stream__create_for_install(stream,
+                                           temp_dir_abspath,
+                                           result_pool, scratch_pool),
+            _("Unable to create pristine install stream"));
 
   (*install_data)->inner_stream = *stream;
 

Modified: subversion/trunk/subversion/tests/cmdline/update_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/update_tests.py?rev=1702203&r1=1702202&r2=1702203&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/update_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/update_tests.py Thu Sep 10 10:02:05 2015
@@ -6756,6 +6756,23 @@ def update_add_conflicted_deep(sbox):
   # This final update used to segfault using 1.9.0 and 1.9.1
   sbox.simple_update('A/z/z', 3)
 
+def missing_tmp_update(sbox):
+  "missing tmp update caused segfault"
+
+  sbox.build(read_only = True)
+  wc_dir = sbox.wc_dir
+  svntest.actions.run_and_verify_update(wc_dir, None, None, None, [], False,
+                                        wc_dir, '--set-depth', 'empty')
+
+  os.rmdir(sbox.ospath(svntest.main.get_admin_name() + '/tmp'))
+
+  svntest.actions.run_and_verify_svn(None, '.*Unable to create.*',
+                                     'up', wc_dir, '--set-depth', 'infinity')
+
+  svntest.actions.run_and_verify_svn(None, [], 'cleanup', wc_dir)
+
+  svntest.actions.run_and_verify_update(wc_dir, None, None, None, [], False,
+                                        wc_dir, '--set-depth', 'infinity')
 
 #######################################################################
 # Run the tests
@@ -6845,6 +6862,7 @@ test_list = [ None,
               update_conflict_details,
               update_keywords_on_shortcut,
               update_add_conflicted_deep,
+              missing_tmp_update,
              ]
 
 if __name__ == '__main__':



Mime
View raw message