You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2012/03/01 05:54:48 UTC

svn commit: r1295418 - /subversion/trunk/subversion/tests/cmdline/svntest/sandbox.py

Author: danielsh
Date: Thu Mar  1 04:54:47 2012
New Revision: 1295418

URL: http://svn.apache.org/viewvc?rev=1295418&view=rev
Log:
Commit a helper function I used in r1295187.

(Likely no one noticed this because the test is marked XFail; we
aren't good at verifying that XFail test fail for the right reason.)

* subversion/tests/cmdline/svntest/sandbox.py
  (Sandbox.simple_append): New helper.

Modified:
    subversion/trunk/subversion/tests/cmdline/svntest/sandbox.py

Modified: subversion/trunk/subversion/tests/cmdline/svntest/sandbox.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/sandbox.py?rev=1295418&r1=1295417&r2=1295418&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svntest/sandbox.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/sandbox.py Thu Mar  1 04:54:47 2012
@@ -281,6 +281,10 @@ class Sandbox:
                          self.repo_url + '/' + source,
                          self.repo_url + '/' + dest)
 
+  def simple_append(self, dest, contents, truncate=False):
+    """Append CONTENTS to file DEST, optionally truncating it first."""
+    open(self.ospath(dest), truncate and 'w' or 'a').write(contents)
+
 
 def is_url(target):
   return (target.startswith('^/')