Thanks, David. That fixed it. But now reviewboard itself seems to stumble over unicode paths.

$ rbt post --repository-url=http://svn/svn/main/ --username=stbohne --password=XXX -d --server=http://reviews/ 8792
>>> RBTools 0.6
>>> Python 2.7.5+ (default, Feb 27 2014, 19:39:55)
[GCC 4.8.1]
>>> Running on Linux-3.11.0-18-generic-i686-with-Ubuntu-13.10-saucy
>>> Home = /home/stbohne
>>> Current directory = /home/stbohne
>>> Checking for a Subversion repository...
>>> Running: svn info http://svn/svn/main/ --non-interactive
>>> Running: diff --version
>>> repository info: Path: http://svn/svn/main, Base path: /, Supports changesets: False
>>> Making HTTP GET request to http://reviews/api/
>>> Making HTTP GET request to http://reviews/api/info/
>>> Running: svn log -r 8792 -l 1 --xml http://svn/svn/main/
>>> Running: svn info http://svn/svn/main/ --non-interactive
>>> Running: diff --version
>>> repository info: Path: http://svn/svn/main, Base path: /, Supports changesets: False
>>> Running: svn status --ignore-externals
>>> Running: svn diff --diff-cmd=diff --notice-ancestry http://svn/svn/main/@8791 http://svn/svn/main/@8792
>>> Making HTTP GET request to http://reviews/api/review-requests/
>>> Making HTTP POST request to http://reviews/api/review-requests/
>>> Making HTTP GET request to http://reviews/api/review-requests/2194/diffs/ >>> Making HTTP POST request to http://reviews/api/review-requests/2194/diffs/
>>> Got API Error 105 (HTTP code 400): One or more fields had errors
>>> Error data: {u'fields': {u'path': [u"'ascii' codec can't decode byte 0xc3 in position 20: ordinal not in range(128)"]}, u'stat': u'fail', u'err': {u'msg': u'One or more fields had errors', u'code': 105}}
Traceback (most recent call last):
  File "/usr/local/bin/rbt", line 9, in <module>
    load_entry_point('RBTools==0.6', 'console_scripts', 'rbt')()
File "/usr/local/lib/python2.7/dist-packages/RBTools-0.6-py2.7.egg/rbtools/commands/main.py", line 134, in main
    command.run_from_argv([RB_MAIN, command_name] + args)
File "/usr/local/lib/python2.7/dist-packages/RBTools-0.6-py2.7.egg/rbtools/commands/__init__.py", line 422, in run_from_argv
    exit_code = self.main(*args) or 0
File "/usr/local/lib/python2.7/dist-packages/RBTools-0.6-py2.7.egg/rbtools/commands/post.py", line 769, in main
    submit_as=self.options.submit_as)
File "/usr/local/lib/python2.7/dist-packages/RBTools-0.6-py2.7.egg/rbtools/commands/post.py", line 545, in post_request
    raise CommandError('\n'.join(error_msg))
rbtools.commands.CommandError: Error uploading diff


One or more fields had errors (HTTP 400, API Error 105)

path: 'ascii' codec can't decode byte 0xc3 in position 20: ordinal not in range(128)

Your review request still exists, but the diff is not attached.


Am Dienstag, 29. April 2014 00:01:50 UTC+2 schrieb David Trowbridge:

   I believe that this is because we remove locale configuration, since
   svn likes to localize some of the control strings in the diffs.
   Could you test a prospective code change for this?

   In rbtools/util/process.py, there are two lines:

   env['LC_ALL'] = 'C'
   env['LANGUAGE'] = 'C'

   Can you change 'C' to 'C.UTF-8' and see if it works?

   -David


   On Mon, Apr 28, 2014 at 6:06 AM, Stefan Bohne
   <[email protected] <javascript:>> wrote:

       Hello,

       I'm having problems posting a review request from a subversion
       repository with rbt post that contains non-ascii file names. It
       seems that rbt post executes svn diff with a non-unicode locale
       and that makes svn fail. The same svn command works when typed
       on the command line. But it could also be a configuration
       problem on my side. Any hints would be much appreciated. Below
       is the command line output with debug infos.


       $ rbt post --repository-url=http://svn/svn/main
       <http://svn/svn/main> --username=stbohne --password=XXX -d
       --server=http://reviews/ 8792
        >>> RBTools 0.6
        >>> Python 2.7.5+ (default, Feb 27 2014, 19:39:55)
       [GCC 4.8.1]
        >>> Running on Linux-3.11.0-18-generic-i686-with-Ubuntu-13.10-saucy
        >>> Home = /home/stbohne
        >>> Current directory = /home/stbohne
        >>> Checking for a Subversion repository...
        >>> Running: svn info http://svn/svn/main --non-interactive
        >>> Running: diff --version
        >>> repository info: Path: http://svn/svn/main, Base path: /,
       Supports changesets: False
        >>> Making HTTP GET request to http://reviews/api/
        >>> Making HTTP GET request to http://reviews/api/info/
        >>> Running: svn log -r 8792 -l 1 --xml http://svn/svn/main
        >>> Running: svn info http://svn/svn/main --non-interactive
        >>> Running: diff --version
        >>> repository info: Path: http://svn/svn/main, Base path: /,
       Supports changesets: False
        >>> Running: svn status --ignore-externals
        >>> Running: svn diff --diff-cmd=diff --notice-ancestry
       http://svn/svn/main/@8791 http://svn/svn/main/@8792
       Failed to execute command: ['svn', 'diff', '--diff-cmd=diff',
       '--notice-ancestry', 'http://svn/svn/main/@8791',
       'http://svn/svn/main/@8792']
       ["svn: E000022: Can't convert string from 'UTF-8' to native
       encoding:\n", 'svn: E000022: Index: Beaglebone
       Black/Z?\\195?\\188rn/branches/silo/var/www/silo/welcome.cgi\n',
       '===================================================================\n',
       '\n', 'svn: E175002: Error reading spooled REPORT request
       response\n']
       stbohne@sentec116:~$ locale
       LANG=de_DE.UTF-8
       LANGUAGE=
       LC_CTYPE="de_DE.UTF-8"
       LC_NUMERIC=de_DE.UTF-8
       LC_TIME=de_DE.UTF-8
       LC_COLLATE="de_DE.UTF-8"
       LC_MONETARY=de_DE.UTF-8
       LC_MESSAGES="de_DE.UTF-8"
       LC_PAPER=de_DE.UTF-8
       LC_NAME=de_DE.UTF-8
       LC_ADDRESS=de_DE.UTF-8
       LC_TELEPHONE=de_DE.UTF-8
       LC_MEASUREMENT=de_DE.UTF-8
       LC_IDENTIFICATION=de_DE.UTF-8
       LC_ALL=
       $ svn diff --diff-cmd=diff --notice-ancestry
       http://svn/svn/main/@8791 http://svn/svn/main/@8792
       Index: Beaglebone Black/Zürn/branches/silo/var/www/silo/welcome.cgi
       ===================================================================
       --- Beaglebone Black/Zürn/branches/silo/var/www/silo/welcome.cgi
               (Revision 8791)
       +++ Beaglebone Black/Zürn/branches/silo/var/www/silo/welcome.cgi
               (Revision 8792)
       @@ -1,7 +1,6 @@
         #!/usr/bin/python
         import cgi
         import cgitb; cgitb.enable()
       -import pexpect
         import os
         import hashlib

       Thanks,
       Stefan

-- Get the Review Board Power Pack at
       http://www.reviewboard.org/powerpack/
       <http://www.reviewboard.org/powerpack/>
       ---
       Sign up for Review Board hosting at RBCommons:
       https://rbcommons.com/
       ---
       Happy user? Let us know at http://www.reviewboard.org/users/
       <http://www.reviewboard.org/users/>
       --- You received this message because you are subscribed to the
       Google Groups "reviewboard" group.
       To unsubscribe from this group and stop receiving emails from
       it, send an email to [email protected] <javascript:>.
       For more options, visit https://groups.google.com/d/optout
       <https://groups.google.com/d/optout>.


--
Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/
---
Sign up for Review Board hosting at RBCommons: https://rbcommons.com/
---
Happy user? Let us know at http://www.reviewboard.org/users/
--- You received this message because you are subscribed to the Google Groups "reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to