Hi,

Originally an issue reported to TortoiseSVN and discussed on StackOverflow,
a user added this to JIRA: https://issues.apache.org/jira/browse/SVN-4868

I'm attaching a test for reviewing.

I have a patch in temp_file_create in libsvn_subr/io.c which seems to be
working on Linux but it doesn't help on Windows. (To be clear, I saw the
#ifndef WIN32 and I've added patches also in the #else section that execute
in Windows, but WIN32 seems to be taking another code path earlier. Also
the error number is different E720003 but the message is the same).

My feeling is that this is a fairly uncommon error and I wonder about the
cost of having an extra stat every time a temp file is created. There is
already a check in svn cleanup (which is also available as a menu choice in
TSVN). Of course the "Unable to create pristine install stream" doesn't
clearly direct the user to "try svn cleanup first".

Kind regards,
Daniel Sahlberg
Index: subversion/tests/cmdline/wc_tests.py
===================================================================
--- subversion/tests/cmdline/wc_tests.py        (revision 1884649)
+++ subversion/tests/cmdline/wc_tests.py        (working copy)
@@ -360,7 +360,35 @@ def checkout_within_locked_wc(sbox):
                                      [], "checkout", sbox.repo_url + '/A/B/E',
                                      sbox.ospath("nested-wc"))
 
+@XFail()
+@Issue(4868)
+def status_without_tmp(sbox):
+  """missing .svn/tmp/"""
 
+  sbox.build()
+  os.removedirs(sbox.ospath(".svn/tmp"))
+  wc_dir = sbox.wc_dir
+
+  # Make a couple of local mods to files
+  iota_path = sbox.ospath('iota')
+  svntest.main.file_append(iota_path, 'appended mu text')
+
+  # Created expected output tree for 'svn ci'
+  # Currently returns
+  # "svn: E000002: Unable to create pristine install stream"
+  expected_output = wc.State(wc_dir, {
+    'iota' : Item(verb='Sending'),
+    })
+
+  # Create expected status tree; all local revisions should be at 1.
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+  expected_status.tweak('iota', wc_rev=2)
+
+  svntest.actions.run_and_verify_commit(wc_dir,
+                                        expected_output,
+                                        expected_status)
+  
+
 ########################################################################
 # Run the tests
 
@@ -384,6 +412,7 @@ test_list = [ None,
               cleanup_unversioned_items_in_locked_wc,
               cleanup_dir_external,
               checkout_within_locked_wc,
+              status_without_tmp,
              ]
 
 if __name__ == '__main__':

Reply via email to