After some investigation we found the following:

# TODO: This can break on systems that don't have the en_US local

# installed (which isn't very many). Ideally in this case, we could

# put something in the config file, but that's not plumbed through to here.

env['LC_ALL'] = 'en_US.UTF-8'

env['LANGUAGE'] = 'en_US.UTF-8'

We can confirm that it does break things!

With the 'en_US.UTF-8' locale installed the problem goes away - is there a 
way to check this locale is installed and error nicely rather than breaking?
Cheers
Dan

On Saturday, 31 January 2015 18:49:02 UTC, David Trowbridge wrote:
>
> Hi Daniel,
>
> Do you think you could add some code to print out the contents of 'log' 
> inside _convert_symbolic_revision before we try to construct the etree?
>
> Thanks,
> -David
>
>
> On Fri Jan 30 2015 at 4:48:37 AM Daniel Laird <daniel....@googlemail.com 
> <javascript:>> wrote:
>
>> We have a shared Debian server and we have updated RBtools to 0.7.
>>
>> When we try to post a review we get the following:
>>
>> SERVER_NAME> rbt post -d NUM
>> >>> RBTools 0.7
>> >>> Python 2.7.3 (default, Mar 13 2014, 11:03:55) 
>> [GCC 4.7.2]
>> >>> Running on Linux-3.2.0-4-amd64-x86_64-with-debian-7.8
>> >>> Home = /v/home/rad/USERNAME
>> >>> Current directory = /v/space/SERVER_NAME/USERNAME/
>> wc/memory_corruption
>> >>> Checking for a Subversion repository...
>> >>> Running: svn info --non-interactive
>> >>> Running: diff --version
>> >>> repository info: Path: https://SVN_SERVER/svn-restricted/PROJNAME, 
>> Base path: /branches/users/bob/memory_corruption, Supports changesets: 
>> False
>> >>> Making HTTP GET request to http://REVIEWBOARD_SERVER/api/
>> >>> HTTP GET request to http://REVIEWBOARD_SERVER/api/ cannot be cached
>> >>> Making HTTP GET request to http://REVIEWBOARD_SERVER/api/
>> repositories/
>> >>> HTTP GET request to http://REVIEWBOARD_SERVER/api/repositories/ 
>> cannot be cached
>> >>> Making HTTP GET request to http://REVIEWBOARD_SERVER/api/
>> repositories/?max-results=25&start=25
>> >>> HTTP GET request to http://REVIEWBOARD_SERVER/api/
>> repositories/?max-results=25&start=25 cannot be cached
>> >>> Making HTTP GET request to http://REVIEWBOARD_SERVER/api/
>> repositories/1/info/
>> >>> HTTP GET request to http://REVIEWBOARD_SERVER/api/
>> repositories/1/info/ cannot be cached
>> >>> Making HTTP GET request to http://REVIEWBOARD_SERVER/api/
>> repositories/2/info/
>> >>> HTTP GET request to http://REVIEWBOARD_SERVER/api/
>> repositories/2/info/ cannot be cached
>> >>> Making HTTP GET request to http://REVIEWBOARD_SERVER/api/
>> repositories/3/info/
>> >>> HTTP GET request to http://REVIEWBOARD_SERVER/api/
>> repositories/3/info/ cannot be cached
>> >>> Making HTTP GET request to http://REVIEWBOARD_SERVER/api/
>> repositories/4/info/
>> >>> HTTP GET request to http://REVIEWBOARD_SERVER/api/
>> repositories/4/info/ cannot be cached
>> >>> Making HTTP GET request to http://REVIEWBOARD_SERVER/api/
>> repositories/5/info/
>> >>> HTTP GET request to http://REVIEWBOARD_SERVER/api/
>> repositories/5/info/ cannot be cached
>> >>> Making HTTP GET request to http://REVIEWBOARD_SERVER/api/
>> repositories/6/info/
>> >>> HTTP GET request to http://REVIEWBOARD_SERVER/api/
>> repositories/6/info/ cannot be cached
>> >>> Making HTTP GET request to http://REVIEWBOARD_SERVER/api/
>> repositories/7/info/
>> >>> HTTP GET request to http://REVIEWBOARD_SERVER/api/
>> repositories/7/info/ cannot be cached
>> >>> Making HTTP GET request to http://REVIEWBOARD_SERVER/api/
>> repositories/8/info/
>> >>> HTTP GET request to http://REVIEWBOARD_SERVER/api/
>> repositories/8/info/ cannot be cached
>> >>> Making HTTP GET request to http://REVIEWBOARD_SERVER/api/
>> repositories/9/info/
>> >>> HTTP GET request to http://REVIEWBOARD_SERVER/api/
>> repositories/9/info/ cannot be cached
>> >>> Making HTTP GET request to http://REVIEWBOARD_SERVER/api/
>> repositories/10/info/
>> >>> HTTP GET request to http://REVIEWBOARD_SERVER/api/
>> repositories/10/info/ cannot be cached
>> >>> Making HTTP GET request to http://REVIEWBOARD_SERVER/api/
>> repositories/11/info/
>> >>> HTTP GET request to http://REVIEWBOARD_SERVER/api/
>> repositories/11/info/ cannot be cached
>> >>> Making HTTP GET request to http://REVIEWBOARD_SERVER/api/
>> repositories/12/info/
>> >>> HTTP GET request to http://REVIEWBOARD_SERVER/api/
>> repositories/12/info/ cannot be cached
>> >>> Making HTTP GET request to http://REVIEWBOARD_SERVER/api/
>> repositories/13/info/
>> >>> HTTP GET request to http://REVIEWBOARD_SERVER/api/
>> repositories/13/info/ cannot be cached
>> >>> Making HTTP GET request to http://REVIEWBOARD_SERVER/api/
>> repositories/14/info/
>> >>> HTTP GET request to http://REVIEWBOARD_SERVER/api/
>> repositories/14/info/ cannot be cached
>> >>> repository info: Path: https://SVN_SERVER/svn-restricted/PROJNAME, 
>> Base path: /branches/users/bob/memory_corruption, Supports changesets: 
>> False
>> >>> Running: svn log -r REVNUM -l 1 --xml
>> Traceback (most recent call last):
>>   File "/v/home/rad/USERNAME/.local/bin/rbt", line 9, in <module>
>>     load_entry_point('RBTools==0.7', 'console_scripts', 'rbt')()
>>   File "/v/home/rad/USERNAME/.local/lib/python2.7/site-packages/
>> RBTools-0.7-py2.7.egg/rbtools/commands/main.py", line 133, in main
>>     command.run_from_argv([RB_MAIN, command_name] + args)
>>   File "/v/home/rad/USERNAME/.local/lib/python2.7/site-packages/
>> RBTools-0.7-py2.7.egg/rbtools/commands/__init__.py", line 538, in 
>> run_from_argv
>>     exit_code = self.main(*args) or 0
>>   File "/v/home/rad/USERNAME/.local/lib/python2.7/site-packages/
>> RBTools-0.7-py2.7.egg/rbtools/commands/post.py", line 618, in main
>>     self.revisions = get_revisions(self.tool, self.cmd_args)
>>   File "/v/home/rad/USERNAME/.local/lib/python2.7/site-packages/
>> RBTools-0.7-py2.7.egg/rbtools/utils/review_request.py", line 73, in 
>> get_revisions
>>     revisions = tool.parse_revision_spec(cmd_args)
>>   File "/v/home/rad/USERNAME/.local/lib/python2.7/site-packages/
>> RBTools-0.7-py2.7.egg/rbtools/clients/svn.py", line 128, in 
>> parse_revision_spec
>>     revision = self._convert_symbolic_revision(revision)
>>   File "/v/home/rad/USERNAME/.local/lib/python2.7/site-packages/
>> RBTools-0.7-py2.7.egg/rbtools/clients/svn.py", line 173, in 
>> _convert_symbolic_revision
>>     root = ElementTree.fromstring(log)
>>   File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1301, in XML
>>     parser.feed(text)
>>   File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1643, in feed
>>     self._raiseerror(v)
>>   File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1507, in 
>> _raiseerror
>>     raise err
>> xml.etree.ElementTree.ParseError: syntax error: line 1, column 0
>>
>> SERVER_NAME> svn log -r REVNUM -l 1 --xml
>> <?xml version="1.0" encoding="UTF-8"?>
>> <log>
>> <logentry
>>    revision="REVNUM">
>> <author>bob</author>
>> <date>2015-01-22T09:50:25.184824Z</date>
>> <msg>Fix flexible array</msg>
>> </logentry>
>> </log>
>> SERVER_NAME> 
>>
>> Any ideas on why the svn log gives valid XML but RBTools seems unhappy 
>> with it?
>>
>> Cheers
>> Dan
>>
>> -- 
>> Supercharge your Review Board with Power Pack: 
>> https://www.reviewboard.org/powerpack/
>> Want us to host Review Board for you? Check out RBCommons: 
>> https://rbcommons.com/
>> Happy user? Let us know! https://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 reviewboard...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://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 reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to