Daniel Sahlberg wrote on Wed, Jan 27, 2021 at 08:57:01 +0100: > Also > the error number is different E720003 but the message is the same).
(Just making sure you're aware of tools/dev/which-error.py.) > 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. Agreed, but that's what EAFP¹ is for. We can just open(".svn/tmp/foo"). Usually it'll just work. If it fails, we can then check the error code to see whether .svn/tmp/ might be missing. ¹ https://docs.python.org/3/glossary.html#term-eafp > 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". > +++ 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")) Use svntest.main.get_admin_name(), please. I don't see anything to suggest SVN_ASP_DOT_NET_HACK is unsupported or deprecated, though I don't think anyone uses it any more, either. > + 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') s/mu/iota/ > + # 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) Hmm. It's conceivable that we'll fix #4868 in a way that makes «svn ci» print a warning about .svn/tmp/ having been removed, on the rationale that it's likely that someone was messing with implementation details. In that case, the XFail test won't start to XPass, since the warning on stderr would cause run_and_verify_commit() to fail, right? If so, should we write the test, so long as it's XFail, in such a way that it'll pass as soon as the commit starts to succeed, regardless of stderr? _After_ we fix the issue we can tighten the verifications (and it'd be good to commit the tighter verifications even now, disabled). Should the test check whether .svn/tmp/ exists at the end? I'm a bit busy over the remainder of the week, so if someone else could take over reviewing future iterations that'd be great. Cheers, Daniel > + > ######################################################################## > # 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__':