Public feed #723416

Someone

public text v1 · immutable
Raw Edit
·published 2007-10-02 19:50 UTC
rendered paste body
def log_xml_with_bad_data(sbox):
  "log --xml escapes non-utf8 data (issue #2866)"
  svntest.actions.load_repo(sbox, os.path.join(os.path.dirname(sys.argv[0]),
                                               'log_tests_data',
                                               'xml-invalid-chars.dump'))

  r0_props = { 'svn:log' :
               'After the colon are a space, 3 bad chars, ' \
               + '3 good chars, and a period: '             \
               + '?\\021?\\022?\\017	\n
.' }
  svntest.actions.run_and_verify_log_xml(
    expected_revprops=(r0_props), args=[sbox.repo_url])


Running that gets me an error:

$ ./log_tests.py -v 25
CMD: svnadmin create svn-test-work/local_tmp/repos --bdb-txn-nosync <TIME = 0.114782>
CMD: svn import --username jrandom --password rayjandom -m "Log message for revision 1." svn-test-work/local_tmp/greekfiles file:///home/kfogel/src/subversion/subversion/tests/cmdline/svn-test-work/local_tmp/repos --config-dir /home/kfogel/src/subversion/subversion/tests/cmdline/svn-test-work/local_tmp/config <TIME = 0.106862>
CMD: svnadmin create svn-test-work/repositories/log_tests-25 --bdb-txn-nosync <TIME = 0.079909>
CMD: svnadmin load --force-uuid --quiet svn-test-work/repositories/log_tests-25 <TIME = 0.041050>
CMD: svn co file:///home/kfogel/src/subversion/subversion/tests/cmdline/svn-test-work/repositories/log_tests-25 svn-test-work/working_copies/log_tests-25 --config-dir /home/kfogel/src/subversion/subversion/tests/cmdline/svn-test-work/local_tmp/config <TIME = 0.039909>
CMD: svn log --xml file:///home/kfogel/src/subversion/subversion/tests/cmdline/svn-test-work/repositories/log_tests-25 --config-dir /home/kfogel/src/subversion/subversion/tests/cmdline/svn-test-work/local_tmp/config <TIME = 0.036938>
UNEXPECTED EXCEPTION:
Traceback (most recent call last):
  File "/home/kfogel/src/subversion/subversion/tests/cmdline/svntest/main.py", line 924, in run
    rc = apply(self.pred.run, (), kw)
  File "/home/kfogel/src/subversion/subversion/tests/cmdline/svntest/testcase.py", line 121, in run
    return self.func(sandbox)
  File "./log_tests.py", line 1302, in log_xml_with_bad_data
    svntest.actions.run_and_verify_log_xml(
  File "/home/kfogel/src/subversion/subversion/tests/cmdline/svntest/actions.py", line 451, in run_and_verify_log_xml
    entry.assert_revprops(expected_revprops[index])
KeyError: 0
FAIL:  log_tests.py 25: log --xml escapes non-utf8 data (issue #2866)