Fix unicode-related error for SVN when using --repository-url option
Review Request #7644 — Created Sept. 19, 2015 and submitted
Fix a lurking unicode string in
get_repository_info()
for specifying the
defaultbase_path
. This could cause a crash inconvert_to_absolute_paths()
when joining with a filename containing non-UTF8 characters. This case was
only accessible when the--repository-url
option was specified.Added a new test case to exercise this bug, and it failed as expected before the
fix was introduced. Since this case requires--repository-url
it is necessary
to update the testdata repository to contain a file with a non-UTF8 filename.
Thus, I introduced revision 4 to the repo which adds a single file with a non-UTF8
character in both its name and file contents.Causing HEAD of the testrepo to advance to r4 in turn caused the existing
test_diff_exclude()
test to fail. This is because this test was modifying
foo.txt
, which is already in the repo, which causes the diff signature to
change to indicate revision 4 versus 3. This is the only test case that has a
dependency on the current HEAD revision number, so to prevent this regression
from occurring again in the future, I altered the test to add a new new file
(bar.txt
) rather than modifying an existing file. This change in approach
does not impact the underlying purpose of the test. Note, since the diff
signature for file additions varies between SVN client versions the decorator is
now utilized to generate the correct MD5 hash.
Ran all unit tests under both SVN 1.6.23 and 1.7.14.
Description | From | Last Updated |
---|---|---|
Col: 80 E501 line too long (93 > 79 characters) |
reviewbot |
-
Tool: Pyflakes Processed Files: rbtools/clients/tests.py rbtools/clients/svn.py Ignored Files: rbtools/clients/testdata/svn-repo/db/txn-current rbtools/clients/testdata/svn-repo/db/current rbtools/clients/testdata/svn-repo/db/revprops/0/4 rbtools/clients/testdata/svn-repo/db/revs/0/4 Tool: PEP8 Style Checker Processed Files: rbtools/clients/tests.py rbtools/clients/svn.py Ignored Files: rbtools/clients/testdata/svn-repo/db/txn-current rbtools/clients/testdata/svn-repo/db/current rbtools/clients/testdata/svn-repo/db/revprops/0/4 rbtools/clients/testdata/svn-repo/db/revs/0/4