[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn blame and filenames with non-ascii chars

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2003-12-16 01:37:14 CET

mark benedetto king wrote:
> On Sun, Dec 14, 2003 at 04:21:59PM -0500, mark benedetto king wrote:
>
>>On Sun, Dec 14, 2003 at 05:46:31PM +0000, Julian Foad wrote:
>>
>>>Even a space in a file name makes "svn blame" fail. Here is an initial
>>>test.
>>
>>The test looks good. Can you make it XFAIL and commit it?
>
> I lied; the log message says "Property change" instead of "Added file
> with space in name".

Here it is, changed to XFail, and with the test repository's log message empty (since most tests use a log message of "log msg" or "fooogle" or some such, which are just empty messages in disguise).

Does anyone else want me to commit it? It is not clever or of much use on its own, so it could just hang around here on the mailing list until there is a patch to go with it, at which time the test may well be extended or just re-created from scratch by someone else.

- Julian

Add a first regression test for "svn blame".

* build.conf
  (fs-test-scripts): Add the new test file "blame_tests.py".

* subversion/tests/clients/cmdline/blame_tests.py
  New file.

Index: build.conf
===================================================================
--- build.conf (revision 8007)
+++ build.conf (working copy)
@@ -56,6 +56,7 @@
         subversion/tests/clients/cmdline/stat_tests.py
         subversion/tests/clients/cmdline/trans_tests.py
         subversion/tests/clients/cmdline/autoprop_tests.py
+ subversion/tests/clients/cmdline/blame_tests.py
         subversion/tests/clients/cmdline/svnadmin_tests.py
         subversion/tests/clients/cmdline/svnlook_tests.py
         subversion/tests/clients/cmdline/svnversion_tests.py
Index: subversion/tests/clients/cmdline/blame_tests.py
===================================================================
--- subversion/tests/clients/cmdline/blame_tests.py (revision 0)
+++ subversion/tests/clients/cmdline/blame_tests.py (revision 0)
@@ -0,0 +1,69 @@
+#!/usr/bin/env python
+#
+# blame_tests.py: testing line-by-line annotation.
+#
+# Subversion is a tool for revision control.
+# See http://subversion.tigris.org for more information.
+#
+# ====================================================================
+# Copyright (c) 2000-2003 CollabNet. All rights reserved.
+#
+# This software is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at http://subversion.tigris.org/license-1.html.
+# If newer versions of this license are posted there, you may use a
+# newer version instead, at your option.
+#
+######################################################################
+
+# General modules
+import os
+
+# Our testing module
+import svntest
+
+
+# (abbreviation)
+Skip = svntest.testcase.Skip
+XFail = svntest.testcase.XFail
+Item = svntest.wc.StateItem
+
+
+######################################################################
+# Tests
+#
+# Each test must return on success or raise on failure.
+
+
+#----------------------------------------------------------------------
+
+def blame_space_in_name(sbox):
+ "annotate a file whose name contains a space"
+ sbox.build()
+
+ file_path = os.path.join(sbox.wc_dir, 'space in name')
+ svntest.main.file_append(file_path, "Hello\n")
+ svntest.main.run_svn(None, 'add', file_path)
+ svntest.main.run_svn(None, 'ci',
+ '--username', svntest.main.wc_author,
+ '--password', svntest.main.wc_passwd,
+ '-m', '', file_path)
+
+ svntest.main.run_svn(None, 'blame', file_path)
+
+
+########################################################################
+# Run the tests
+
+
+# list all tests here, starting with None:
+test_list = [ None,
+ XFail(blame_space_in_name)
+ ]
+
+if __name__ == '__main__':
+ svntest.main.run_tests(test_list)
+ # NOTREACHED
+
+
+### End of file.

Property changes on: subversion/tests/clients/cmdline/blame_tests.py
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:eol-style
   + native

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Dec 16 01:38:08 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.