Re: Syntax highlighting in Diff Viewer doesn't work after upgrade from 1.7.27 to 2.0.20

2015-11-18 Thread Wesly Chen
OK, we did some patch for our own

ReviewBoard-2.0.20-py2.6.egg/reviewboard/scmtools/cvs.py

185a186,188
> def normalize_path_for_display(self, filename):
> return re.sub(",v$", "", filename)
> 

Basically, we add the following two lines after line 186 in 
ReviewBoard-2.0.20-py2.6.egg/reviewboard/scmtools/cvs.py

 def normalize_path_for_display(self, filename):
 return re.sub(",v$", "", filename)
--

And syntax highlighting in Diff Viewer works for me now.

Thanks Christian for helping on this issue.

Best wishes,

Wesly

Christian Hammond於 2015年11月18日星期三 UTC-8下午3時05分40秒寫道:
>
> Sorry, we can't get you an early patch for this just yet. We'd have to do 
> some research and testing, and right now we're swamped with work for some 
> of our premium support customers. However, if your team wants to 
> investigate this and write a patch, we can review it on 
> https://reviews.reviewboard.org/.
>
> In the meantime, please file a bug on 
> https://hellosplat.com/s/beanbag/tickets/ so we can track this.
>
> Christian
>
> -- 
> Christian Hammond - chri...@beanbaginc.com 
> Review Board - https://www.reviewboard.org
> Beanbag, Inc. - https://www.beanbaginc.com
>
> On Wed, Nov 18, 2015 at 3:02 PM, Wesly Chen  > wrote:
>
>> In the error message,
>> 2015-11-18 01:34:33,409 - ERROR -  - Failed to apply pygments: no lexer 
>> for filename u'/home/cvs/OPS/nagios/libexec/check_mysql_multirow.pl,v' 
>> found
>>
>> Review Board might need to add a filename check for CVS repository and 
>> remove the trailing ",v" then pass the filename without ",v" to 
>> "_apply_pygments".
>>
>> In a short term, could you pass me the patch or fix before release since 
>> we have an issue to upgrade from 2.0.20 to 2.5.11.
>>
>> Thanks,
>>
>> Wesly
>>
>> Wesly Chen於 2015年11月18日星期三 UTC-8下午2時36分02秒寫道:
>>
>>> Besides, the path in log
>>> /home/cvs/OPS/nagios/libexec/check_mysql_multirow.pl 
>>> 
>>> ,v
>>> is the path on CVS repository server filesystem.
>>>
>>> My local path is (on different host)
>>> /home/wchen/CVS_work/OPS/nagios/libexec/check_mysql_multirow.pl
>>>
>>> Christian Hammond於 2015年11月18日星期三 UTC-8下午2時26分22秒寫道:

 How are you generating the diffs? I noticed that as well, and I don't 
 believe it should be showing the ",v".

 Christian

 -- 
 Christian Hammond - chri...@beanbaginc.com
 Review Board - https://www.reviewboard.org
 Beanbag, Inc. - https://www.beanbaginc.com

 On Wed, Nov 18, 2015 at 2:25 PM, Wesly Chen  wrote:

> It seems to be related to CVS repository. In CVS repository, all the 
> file will be trailed with ",v" and the content of CVS files are not 
> similar 
> with original one.
> However, "cvs diff" can parse and generate the diff file. So the 
> review board Diff Viewer should check and parse the lexer based on the 
> original filename instead of the one in CVS repository with ",v".  
>
> Wesly Chen於 2015年11月17日星期二 UTC-8下午5時36分20秒寫道:
>
>> 2015-11-18 01:34:33,284 - DEBUG - None - wchen - 
>> /reviews/r/114/diff/3/fragment/1876/ - Patching file 
>> check_mysql_multirow.pl took 0.042870 seconds
>> 2015-11-18 01:34:33,409 - ERROR -  - Failed to apply pygments: no 
>> lexer for filename u'/home/cvs/OPS/nagios/libexec/
>> check_mysql_multirow.pl,v' found
>> Traceback (most recent call last):
>>   File 
>> "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.20-py2.6.egg/reviewboard/diffviewer/chunk_generator.py",
>>  
>> line 231, in _get_chunks_uncached
>> markup_a = self._apply_pygments(old or '', source_file)
>>   File 
>> "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.20-py2.6.egg/reviewboard/diffviewer/chunk_generator.py",
>>  
>> line 654, in _apply_pygments
>> encoding='utf-8')
>>   File 
>> "/usr/lib/python2.6/site-packages/Pygments-2.0.2-py2.6.egg/pygments/lexers/__init__.py",
>>  
>> line 149, in get_lexer_for_filename
>> raise ClassNotFound('no lexer for filename %r found' % _fn)
>> ClassNotFound: no lexer for filename u'/home/cvs/OPS/nagios/libexec/
>> check_mysql_multirow.pl,v' found
>> 2015-11-18 01:34:33,425 - DEBUG - None - wchen - 
>> /reviews/r/114/diff/3/fragment/1876/ - Begin: Generating diff chunks for 
>> self.filediff id 1876 (/home/cvs/OPS/nagios/libexec/
>> check_mysql_multirow.pl,v)
>> 2015-11-18 01:34:33,432 - DEBUG - None - wchen - 
>> /reviews/r/114/diff/3/fragment/1876/ - End: Generating diff chunks for 
>> self.filediff id 1876 (/home/cvs/OPS/nagios/libexec/
>> check_mysql_multirow.pl,v)
>> 2015-11-18 01:34:33,432 - DEBUG - None - wchen - 
>> /reviews/r/114/diff/3/fragment/1876/ - Generating diff chunks for 
>> self.filediff id 1876 (/home/cvs/OPS/nagios/libexec/
>> check_mysql_mult

Re: Syntax highlighting in Diff Viewer doesn't work after upgrade from 1.7.27 to 2.0.20

2015-11-18 Thread Christian Hammond
Sorry, we can't get you an early patch for this just yet. We'd have to do
some research and testing, and right now we're swamped with work for some
of our premium support customers. However, if your team wants to
investigate this and write a patch, we can review it on
https://reviews.reviewboard.org/.

In the meantime, please file a bug on
https://hellosplat.com/s/beanbag/tickets/ so we can track this.

Christian

-- 
Christian Hammond - christ...@beanbaginc.com
Review Board - https://www.reviewboard.org
Beanbag, Inc. - https://www.beanbaginc.com

On Wed, Nov 18, 2015 at 3:02 PM, Wesly Chen  wrote:

> In the error message,
> 2015-11-18 01:34:33,409 - ERROR -  - Failed to apply pygments: no lexer
> for filename u'/home/cvs/OPS/nagios/libexec/check_mysql_multirow.pl,v'
> found
>
> Review Board might need to add a filename check for CVS repository and
> remove the trailing ",v" then pass the filename without ",v" to
> "_apply_pygments".
>
> In a short term, could you pass me the patch or fix before release since
> we have an issue to upgrade from 2.0.20 to 2.5.11.
>
> Thanks,
>
> Wesly
>
> Wesly Chen於 2015年11月18日星期三 UTC-8下午2時36分02秒寫道:
>
>> Besides, the path in log
>> /home/cvs/OPS/nagios/libexec/check_mysql_multirow.pl
>> 
>> ,v
>> is the path on CVS repository server filesystem.
>>
>> My local path is (on different host)
>> /home/wchen/CVS_work/OPS/nagios/libexec/check_mysql_multirow.pl
>>
>> Christian Hammond於 2015年11月18日星期三 UTC-8下午2時26分22秒寫道:
>>>
>>> How are you generating the diffs? I noticed that as well, and I don't
>>> believe it should be showing the ",v".
>>>
>>> Christian
>>>
>>> --
>>> Christian Hammond - chri...@beanbaginc.com
>>> Review Board - https://www.reviewboard.org
>>> Beanbag, Inc. - https://www.beanbaginc.com
>>>
>>> On Wed, Nov 18, 2015 at 2:25 PM, Wesly Chen  wrote:
>>>
 It seems to be related to CVS repository. In CVS repository, all the
 file will be trailed with ",v" and the content of CVS files are not similar
 with original one.
 However, "cvs diff" can parse and generate the diff file. So the review
 board Diff Viewer should check and parse the lexer based on the original
 filename instead of the one in CVS repository with ",v".

 Wesly Chen於 2015年11月17日星期二 UTC-8下午5時36分20秒寫道:

> 2015-11-18 01:34:33,284 - DEBUG - None - wchen -
> /reviews/r/114/diff/3/fragment/1876/ - Patching file
> check_mysql_multirow.pl took 0.042870 seconds
> 2015-11-18 01:34:33,409 - ERROR -  - Failed to apply pygments: no
> lexer for filename u'/home/cvs/OPS/nagios/libexec/
> check_mysql_multirow.pl,v' found
> Traceback (most recent call last):
>   File
> "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.20-py2.6.egg/reviewboard/diffviewer/chunk_generator.py",
> line 231, in _get_chunks_uncached
> markup_a = self._apply_pygments(old or '', source_file)
>   File
> "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.20-py2.6.egg/reviewboard/diffviewer/chunk_generator.py",
> line 654, in _apply_pygments
> encoding='utf-8')
>   File
> "/usr/lib/python2.6/site-packages/Pygments-2.0.2-py2.6.egg/pygments/lexers/__init__.py",
> line 149, in get_lexer_for_filename
> raise ClassNotFound('no lexer for filename %r found' % _fn)
> ClassNotFound: no lexer for filename u'/home/cvs/OPS/nagios/libexec/
> check_mysql_multirow.pl,v' found
> 2015-11-18 01:34:33,425 - DEBUG - None - wchen -
> /reviews/r/114/diff/3/fragment/1876/ - Begin: Generating diff chunks for
> self.filediff id 1876 (/home/cvs/OPS/nagios/libexec/
> check_mysql_multirow.pl,v)
> 2015-11-18 01:34:33,432 - DEBUG - None - wchen -
> /reviews/r/114/diff/3/fragment/1876/ - End: Generating diff chunks for
> self.filediff id 1876 (/home/cvs/OPS/nagios/libexec/
> check_mysql_multirow.pl,v)
> 2015-11-18 01:34:33,432 - DEBUG - None - wchen -
> /reviews/r/114/diff/3/fragment/1876/ - Generating diff chunks for
> self.filediff id 1876 (/home/cvs/OPS/nagios/libexec/
> check_mysql_multirow.pl,v) took 0.006171 seconds
>
>

-- 
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.


Re: Syntax highlighting in Diff Viewer doesn't work after upgrade from 1.7.27 to 2.0.20

2015-11-18 Thread Wesly Chen
In the error message,
2015-11-18 01:34:33,409 - ERROR -  - Failed to apply pygments: no lexer for 
filename u'/home/cvs/OPS/nagios/libexec/check_mysql_multirow.pl,v' found

Review Board might need to add a filename check for CVS repository and 
remove the trailing ",v" then pass the filename without ",v" to 
"_apply_pygments".

In a short term, could you pass me the patch or fix before release since we 
have an issue to upgrade from 2.0.20 to 2.5.11.

Thanks,

Wesly

Wesly Chen於 2015年11月18日星期三 UTC-8下午2時36分02秒寫道:
>
> Besides, the path in log
> /home/cvs/OPS/nagios/libexec/check_mysql_multirow.pl 
> 
> ,v
> is the path on CVS repository server filesystem.
>
> My local path is (on different host)
> /home/wchen/CVS_work/OPS/nagios/libexec/check_mysql_multirow.pl
>
> Christian Hammond於 2015年11月18日星期三 UTC-8下午2時26分22秒寫道:
>>
>> How are you generating the diffs? I noticed that as well, and I don't 
>> believe it should be showing the ",v".
>>
>> Christian
>>
>> -- 
>> Christian Hammond - chri...@beanbaginc.com
>> Review Board - https://www.reviewboard.org
>> Beanbag, Inc. - https://www.beanbaginc.com
>>
>> On Wed, Nov 18, 2015 at 2:25 PM, Wesly Chen  wrote:
>>
>>> It seems to be related to CVS repository. In CVS repository, all the 
>>> file will be trailed with ",v" and the content of CVS files are not similar 
>>> with original one.
>>> However, "cvs diff" can parse and generate the diff file. So the review 
>>> board Diff Viewer should check and parse the lexer based on the original 
>>> filename instead of the one in CVS repository with ",v".  
>>>
>>> Wesly Chen於 2015年11月17日星期二 UTC-8下午5時36分20秒寫道:
>>>
 2015-11-18 01:34:33,284 - DEBUG - None - wchen - 
 /reviews/r/114/diff/3/fragment/1876/ - Patching file 
 check_mysql_multirow.pl took 0.042870 seconds
 2015-11-18 01:34:33,409 - ERROR -  - Failed to apply pygments: no lexer 
 for filename u'/home/cvs/OPS/nagios/libexec/check_mysql_multirow.pl,v' 
 found
 Traceback (most recent call last):
   File 
 "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.20-py2.6.egg/reviewboard/diffviewer/chunk_generator.py",
  
 line 231, in _get_chunks_uncached
 markup_a = self._apply_pygments(old or '', source_file)
   File 
 "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.20-py2.6.egg/reviewboard/diffviewer/chunk_generator.py",
  
 line 654, in _apply_pygments
 encoding='utf-8')
   File 
 "/usr/lib/python2.6/site-packages/Pygments-2.0.2-py2.6.egg/pygments/lexers/__init__.py",
  
 line 149, in get_lexer_for_filename
 raise ClassNotFound('no lexer for filename %r found' % _fn)
 ClassNotFound: no lexer for filename u'/home/cvs/OPS/nagios/libexec/
 check_mysql_multirow.pl,v' found
 2015-11-18 01:34:33,425 - DEBUG - None - wchen - 
 /reviews/r/114/diff/3/fragment/1876/ - Begin: Generating diff chunks for 
 self.filediff id 1876 (/home/cvs/OPS/nagios/libexec/
 check_mysql_multirow.pl,v)
 2015-11-18 01:34:33,432 - DEBUG - None - wchen - 
 /reviews/r/114/diff/3/fragment/1876/ - End: Generating diff chunks for 
 self.filediff id 1876 (/home/cvs/OPS/nagios/libexec/
 check_mysql_multirow.pl,v)
 2015-11-18 01:34:33,432 - DEBUG - None - wchen - 
 /reviews/r/114/diff/3/fragment/1876/ - Generating diff chunks for 
 self.filediff id 1876 (/home/cvs/OPS/nagios/libexec/
 check_mysql_multirow.pl,v) took 0.006171 seconds



-- 
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.


Re: RB cannot send an email if description has non-ascii characters

2015-11-18 Thread Christian Hammond
Hi Alexey,

We fixed some additional Unicode issues with e-mail in 2.0.20. Can you
upgrade and see if this still reproduces?

Christian

-- 
Christian Hammond - christ...@beanbaginc.com
Review Board - https://www.reviewboard.org
Beanbag, Inc. - https://www.beanbaginc.com

On Wed, Nov 18, 2015 at 2:50 PM, Alexey Neyman 
wrote:

> Hi,
>
> We've seen a number of cases where RB does not send an email if the text
> entered into the description field contains characters outside of ASCII
> range. For example, it happens a character U+2019, 'right single quotation
> mark' is substituted by some editors instead of plain apostrophe. RB
> displays such requests normally, but fails to send an email notification.
> In the server log, the following stacktrace is printed:
>
> Traceback (most recent call last):
>   File
> "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.19-py2.6.egg/reviewboard/notifications/email.py",
> line 632, in send_review_mail
> message.send()
>   File
> "/usr/lib/python2.6/site-packages/Django-1.6.11.1-py2.6.egg/django/core/mail/message.py",
> line 276, in send
> return self.get_connection(fail_silently).send_messages([self])
>   File
> "/usr/lib/python2.6/site-packages/Django-1.6.11.1-py2.6.egg/django/core/mail/backends/smtp.py",
> line 94, in send_messages
> sent = self._send(message)
>   File
> "/usr/lib/python2.6/site-packages/Django-1.6.11.1-py2.6.egg/django/core/mail/backends/smtp.py",
> line 110, in _send
> self.connection.sendmail(from_email, recipients, message.as_bytes())
>   File
> "/usr/lib/python2.6/site-packages/Django-1.6.11.1-py2.6.egg/django/core/mail/message.py",
> line 138, in as_string
> return fp.getvalue()
>   File "/usr/lib64/python2.6/StringIO.py", line 270, in getvalue
> self.buf += ''.join(self.buflist)
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 748:
> ordinal not in range(128)
>
> (0xe2 is the first byte in the UTF-8 sequence for that U+2019 character:
> 0xe2 0x80 0x99). Why is RB trying to decode the text as ASCII?
>
> Regards,
> Alexey.
>
> --
> 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.
>

-- 
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.


RB cannot send an email if description has non-ascii characters

2015-11-18 Thread Alexey Neyman
Hi,

We've seen a number of cases where RB does not send an email if the text 
entered into the description field contains characters outside of ASCII 
range. For example, it happens a character U+2019, 'right single quotation 
mark' is substituted by some editors instead of plain apostrophe. RB 
displays such requests normally, but fails to send an email notification. 
In the server log, the following stacktrace is printed:

Traceback (most recent call last):
  File 
"/usr/lib/python2.6/site-packages/ReviewBoard-2.0.19-py2.6.egg/reviewboard/notifications/email.py",
 
line 632, in send_review_mail
message.send()
  File 
"/usr/lib/python2.6/site-packages/Django-1.6.11.1-py2.6.egg/django/core/mail/message.py",
 
line 276, in send
return self.get_connection(fail_silently).send_messages([self])
  File 
"/usr/lib/python2.6/site-packages/Django-1.6.11.1-py2.6.egg/django/core/mail/backends/smtp.py",
 
line 94, in send_messages
sent = self._send(message)
  File 
"/usr/lib/python2.6/site-packages/Django-1.6.11.1-py2.6.egg/django/core/mail/backends/smtp.py",
 
line 110, in _send
self.connection.sendmail(from_email, recipients, message.as_bytes())
  File 
"/usr/lib/python2.6/site-packages/Django-1.6.11.1-py2.6.egg/django/core/mail/message.py",
 
line 138, in as_string
return fp.getvalue()
  File "/usr/lib64/python2.6/StringIO.py", line 270, in getvalue
self.buf += ''.join(self.buflist)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 748: 
ordinal not in range(128)

(0xe2 is the first byte in the UTF-8 sequence for that U+2019 character: 
0xe2 0x80 0x99). Why is RB trying to decode the text as ASCII?

Regards,
Alexey.

-- 
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.


Re: Syntax highlighting in Diff Viewer doesn't work after upgrade from 1.7.27 to 2.0.20

2015-11-18 Thread Wesly Chen
Besides, the path in log
/home/cvs/OPS/nagios/libexec/check_mysql_multirow.pl 

,v
is the path on CVS repository server filesystem.

My local path is (on different host)
/home/wchen/CVS_work/OPS/nagios/libexec/check_mysql_multirow.pl

Christian Hammond於 2015年11月18日星期三 UTC-8下午2時26分22秒寫道:
>
> How are you generating the diffs? I noticed that as well, and I don't 
> believe it should be showing the ",v".
>
> Christian
>
> -- 
> Christian Hammond - chri...@beanbaginc.com 
> Review Board - https://www.reviewboard.org
> Beanbag, Inc. - https://www.beanbaginc.com
>
> On Wed, Nov 18, 2015 at 2:25 PM, Wesly Chen  > wrote:
>
>> It seems to be related to CVS repository. In CVS repository, all the file 
>> will be trailed with ",v" and the content of CVS files are not similar with 
>> original one.
>> However, "cvs diff" can parse and generate the diff file. So the review 
>> board Diff Viewer should check and parse the lexer based on the original 
>> filename instead of the one in CVS repository with ",v".  
>>
>> Wesly Chen於 2015年11月17日星期二 UTC-8下午5時36分20秒寫道:
>>
>>> 2015-11-18 01:34:33,284 - DEBUG - None - wchen - 
>>> /reviews/r/114/diff/3/fragment/1876/ - Patching file 
>>> check_mysql_multirow.pl took 0.042870 seconds
>>> 2015-11-18 01:34:33,409 - ERROR -  - Failed to apply pygments: no lexer 
>>> for filename u'/home/cvs/OPS/nagios/libexec/check_mysql_multirow.pl,v' 
>>> found
>>> Traceback (most recent call last):
>>>   File 
>>> "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.20-py2.6.egg/reviewboard/diffviewer/chunk_generator.py",
>>>  
>>> line 231, in _get_chunks_uncached
>>> markup_a = self._apply_pygments(old or '', source_file)
>>>   File 
>>> "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.20-py2.6.egg/reviewboard/diffviewer/chunk_generator.py",
>>>  
>>> line 654, in _apply_pygments
>>> encoding='utf-8')
>>>   File 
>>> "/usr/lib/python2.6/site-packages/Pygments-2.0.2-py2.6.egg/pygments/lexers/__init__.py",
>>>  
>>> line 149, in get_lexer_for_filename
>>> raise ClassNotFound('no lexer for filename %r found' % _fn)
>>> ClassNotFound: no lexer for filename u'/home/cvs/OPS/nagios/libexec/
>>> check_mysql_multirow.pl,v' found
>>> 2015-11-18 01:34:33,425 - DEBUG - None - wchen - 
>>> /reviews/r/114/diff/3/fragment/1876/ - Begin: Generating diff chunks for 
>>> self.filediff id 1876 (/home/cvs/OPS/nagios/libexec/
>>> check_mysql_multirow.pl,v)
>>> 2015-11-18 01:34:33,432 - DEBUG - None - wchen - 
>>> /reviews/r/114/diff/3/fragment/1876/ - End: Generating diff chunks for 
>>> self.filediff id 1876 (/home/cvs/OPS/nagios/libexec/
>>> check_mysql_multirow.pl,v)
>>> 2015-11-18 01:34:33,432 - DEBUG - None - wchen - 
>>> /reviews/r/114/diff/3/fragment/1876/ - Generating diff chunks for 
>>> self.filediff id 1876 (/home/cvs/OPS/nagios/libexec/
>>> check_mysql_multirow.pl,v) took 0.006171 seconds
>>>
>>>
>>> Christian Hammond於 2015年11月17日星期二 UTC-8下午5時29分13秒寫道:

 Okay, you'll have to add 'import logging' to the line above the logging 
 statement.

 Christian

 -- 
 Christian Hammond - chri...@beanbaginc.com
 Review Board - https://www.reviewboard.org
 Beanbag, Inc. - https://www.beanbaginc.com

 On Tue, Nov 17, 2015 at 5:09 PM, Wesly Chen  wrote:

> I modified 
> --
> markup_b = self._apply_pygments(new or '', dest_file)
> except:
> pass
> 
> to
> 
> markup_b = self._apply_pygments(new or '', dest_file)
> except Exception as e:
> logging.exception('Failed to apply pygments: %s', e)
> --
>
> Then restarted memcached/httpd.
> loaded a diff file via rbt (rbt post -u -r 114 -I 
> check_mysql_multirow.pl)
> and I got an error on UI
> 
>  There was an error displaying this diff.
> 
> global name 'logging' is not defined
>
> Details:
> Traceback (most recent call last):
>   File 
> "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.20-py2.6.egg/reviewboard/diffviewer/views.py",
>  
> line 265, in get
> response = renderer.render_to_response(request)
>   File 
> "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.20-py2.6.egg/reviewboard/diffviewer/renderers.py",
>  
> line 56, in render_to_response
> return HttpResponse(self.render_to_string(request))
>   File 
> "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.20-py2.6.egg/reviewboard/diffviewer/renderers.py",
>  
> line 74, in render_to_string
> large_data=True)
>   File 
> "/usr/lib/python2.6/site-packages/Djblets-0.8.22-py2.6.egg/djblets/cache/backend.py",
>  
> line 111, in cache_memoize
> data = lookup_callable()
>   File 
> "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.20-py2.6.egg/r

Re: Syntax highlighting in Diff Viewer doesn't work after upgrade from 1.7.27 to 2.0.20

2015-11-18 Thread Wesly Chen
Using "rbt post", full command as following:
--
rbt post -u -r 114 -I check_mysql_multirow.pl

And the rbt post reference my ~/.reviewboardrc setting
REPOSITORY = "CVS-prod"
which is defined in reviewboard.

rbt is using the local "cvs" command to generate the diff.



Christian Hammond於 2015年11月18日星期三 UTC-8下午2時26分22秒寫道:
>
> How are you generating the diffs? I noticed that as well, and I don't 
> believe it should be showing the ",v".
>
> Christian
>
> -- 
> Christian Hammond - chri...@beanbaginc.com 
> Review Board - https://www.reviewboard.org
> Beanbag, Inc. - https://www.beanbaginc.com
>
> On Wed, Nov 18, 2015 at 2:25 PM, Wesly Chen  > wrote:
>
>> It seems to be related to CVS repository. In CVS repository, all the file 
>> will be trailed with ",v" and the content of CVS files are not similar with 
>> original one.
>> However, "cvs diff" can parse and generate the diff file. So the review 
>> board Diff Viewer should check and parse the lexer based on the original 
>> filename instead of the one in CVS repository with ",v".  
>>
>> Wesly Chen於 2015年11月17日星期二 UTC-8下午5時36分20秒寫道:
>>
>>> 2015-11-18 01:34:33,284 - DEBUG - None - wchen - 
>>> /reviews/r/114/diff/3/fragment/1876/ - Patching file 
>>> check_mysql_multirow.pl took 0.042870 seconds
>>> 2015-11-18 01:34:33,409 - ERROR -  - Failed to apply pygments: no lexer 
>>> for filename u'/home/cvs/OPS/nagios/libexec/check_mysql_multirow.pl,v' 
>>> found
>>> Traceback (most recent call last):
>>>   File 
>>> "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.20-py2.6.egg/reviewboard/diffviewer/chunk_generator.py",
>>>  
>>> line 231, in _get_chunks_uncached
>>> markup_a = self._apply_pygments(old or '', source_file)
>>>   File 
>>> "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.20-py2.6.egg/reviewboard/diffviewer/chunk_generator.py",
>>>  
>>> line 654, in _apply_pygments
>>> encoding='utf-8')
>>>   File 
>>> "/usr/lib/python2.6/site-packages/Pygments-2.0.2-py2.6.egg/pygments/lexers/__init__.py",
>>>  
>>> line 149, in get_lexer_for_filename
>>> raise ClassNotFound('no lexer for filename %r found' % _fn)
>>> ClassNotFound: no lexer for filename u'/home/cvs/OPS/nagios/libexec/
>>> check_mysql_multirow.pl,v' found
>>> 2015-11-18 01:34:33,425 - DEBUG - None - wchen - 
>>> /reviews/r/114/diff/3/fragment/1876/ - Begin: Generating diff chunks for 
>>> self.filediff id 1876 (/home/cvs/OPS/nagios/libexec/
>>> check_mysql_multirow.pl,v)
>>> 2015-11-18 01:34:33,432 - DEBUG - None - wchen - 
>>> /reviews/r/114/diff/3/fragment/1876/ - End: Generating diff chunks for 
>>> self.filediff id 1876 (/home/cvs/OPS/nagios/libexec/
>>> check_mysql_multirow.pl,v)
>>> 2015-11-18 01:34:33,432 - DEBUG - None - wchen - 
>>> /reviews/r/114/diff/3/fragment/1876/ - Generating diff chunks for 
>>> self.filediff id 1876 (/home/cvs/OPS/nagios/libexec/
>>> check_mysql_multirow.pl,v) took 0.006171 seconds
>>>
>>>
>>> Christian Hammond於 2015年11月17日星期二 UTC-8下午5時29分13秒寫道:

 Okay, you'll have to add 'import logging' to the line above the logging 
 statement.

 Christian

 -- 
 Christian Hammond - chri...@beanbaginc.com
 Review Board - https://www.reviewboard.org
 Beanbag, Inc. - https://www.beanbaginc.com

 On Tue, Nov 17, 2015 at 5:09 PM, Wesly Chen  wrote:

> I modified 
> --
> markup_b = self._apply_pygments(new or '', dest_file)
> except:
> pass
> 
> to
> 
> markup_b = self._apply_pygments(new or '', dest_file)
> except Exception as e:
> logging.exception('Failed to apply pygments: %s', e)
> --
>
> Then restarted memcached/httpd.
> loaded a diff file via rbt (rbt post -u -r 114 -I 
> check_mysql_multirow.pl)
> and I got an error on UI
> 
>  There was an error displaying this diff.
> 
> global name 'logging' is not defined
>
> Details:
> Traceback (most recent call last):
>   File 
> "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.20-py2.6.egg/reviewboard/diffviewer/views.py",
>  
> line 265, in get
> response = renderer.render_to_response(request)
>   File 
> "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.20-py2.6.egg/reviewboard/diffviewer/renderers.py",
>  
> line 56, in render_to_response
> return HttpResponse(self.render_to_string(request))
>   File 
> "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.20-py2.6.egg/reviewboard/diffviewer/renderers.py",
>  
> line 74, in render_to_string
> large_data=True)
>   File 
> "/usr/lib/python2.6/site-packages/Djblets-0.8.22-py2.6.egg/djblets/cache/backend.py",
>  
> line 111, in cache_memoize
> data = lookup_callable()
>   File 
> "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.20-py2.6.egg/reviewboard/diffviewer/renderers.py",
>  
> line 73, in 
>>

Re: Syntax highlighting in Diff Viewer doesn't work after upgrade from 1.7.27 to 2.0.20

2015-11-18 Thread Christian Hammond
How are you generating the diffs? I noticed that as well, and I don't
believe it should be showing the ",v".

Christian

-- 
Christian Hammond - christ...@beanbaginc.com
Review Board - https://www.reviewboard.org
Beanbag, Inc. - https://www.beanbaginc.com

On Wed, Nov 18, 2015 at 2:25 PM, Wesly Chen  wrote:

> It seems to be related to CVS repository. In CVS repository, all the file
> will be trailed with ",v" and the content of CVS files are not similar with
> original one.
> However, "cvs diff" can parse and generate the diff file. So the review
> board Diff Viewer should check and parse the lexer based on the original
> filename instead of the one in CVS repository with ",v".
>
> Wesly Chen於 2015年11月17日星期二 UTC-8下午5時36分20秒寫道:
>
>> 2015-11-18 01:34:33,284 - DEBUG - None - wchen -
>> /reviews/r/114/diff/3/fragment/1876/ - Patching file
>> check_mysql_multirow.pl took 0.042870 seconds
>> 2015-11-18 01:34:33,409 - ERROR -  - Failed to apply pygments: no lexer
>> for filename u'/home/cvs/OPS/nagios/libexec/check_mysql_multirow.pl,v'
>> found
>> Traceback (most recent call last):
>>   File
>> "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.20-py2.6.egg/reviewboard/diffviewer/chunk_generator.py",
>> line 231, in _get_chunks_uncached
>> markup_a = self._apply_pygments(old or '', source_file)
>>   File
>> "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.20-py2.6.egg/reviewboard/diffviewer/chunk_generator.py",
>> line 654, in _apply_pygments
>> encoding='utf-8')
>>   File
>> "/usr/lib/python2.6/site-packages/Pygments-2.0.2-py2.6.egg/pygments/lexers/__init__.py",
>> line 149, in get_lexer_for_filename
>> raise ClassNotFound('no lexer for filename %r found' % _fn)
>> ClassNotFound: no lexer for filename u'/home/cvs/OPS/nagios/libexec/
>> check_mysql_multirow.pl,v' found
>> 2015-11-18 01:34:33,425 - DEBUG - None - wchen -
>> /reviews/r/114/diff/3/fragment/1876/ - Begin: Generating diff chunks for
>> self.filediff id 1876 (/home/cvs/OPS/nagios/libexec/
>> check_mysql_multirow.pl,v)
>> 2015-11-18 01:34:33,432 - DEBUG - None - wchen -
>> /reviews/r/114/diff/3/fragment/1876/ - End: Generating diff chunks for
>> self.filediff id 1876 (/home/cvs/OPS/nagios/libexec/
>> check_mysql_multirow.pl,v)
>> 2015-11-18 01:34:33,432 - DEBUG - None - wchen -
>> /reviews/r/114/diff/3/fragment/1876/ - Generating diff chunks for
>> self.filediff id 1876 (/home/cvs/OPS/nagios/libexec/
>> check_mysql_multirow.pl,v) took 0.006171 seconds
>>
>>
>> Christian Hammond於 2015年11月17日星期二 UTC-8下午5時29分13秒寫道:
>>>
>>> Okay, you'll have to add 'import logging' to the line above the logging
>>> statement.
>>>
>>> Christian
>>>
>>> --
>>> Christian Hammond - chri...@beanbaginc.com
>>> Review Board - https://www.reviewboard.org
>>> Beanbag, Inc. - https://www.beanbaginc.com
>>>
>>> On Tue, Nov 17, 2015 at 5:09 PM, Wesly Chen  wrote:
>>>
 I modified
 --
 markup_b = self._apply_pygments(new or '', dest_file)
 except:
 pass
 
 to
 
 markup_b = self._apply_pygments(new or '', dest_file)
 except Exception as e:
 logging.exception('Failed to apply pygments: %s', e)
 --

 Then restarted memcached/httpd.
 loaded a diff file via rbt (rbt post -u -r 114 -I
 check_mysql_multirow.pl)
 and I got an error on UI
 
  There was an error displaying this diff.

 global name 'logging' is not defined

 Details:
 Traceback (most recent call last):
   File
 "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.20-py2.6.egg/reviewboard/diffviewer/views.py",
 line 265, in get
 response = renderer.render_to_response(request)
   File
 "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.20-py2.6.egg/reviewboard/diffviewer/renderers.py",
 line 56, in render_to_response
 return HttpResponse(self.render_to_string(request))
   File
 "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.20-py2.6.egg/reviewboard/diffviewer/renderers.py",
 line 74, in render_to_string
 large_data=True)
   File
 "/usr/lib/python2.6/site-packages/Djblets-0.8.22-py2.6.egg/djblets/cache/backend.py",
 line 111, in cache_memoize
 data = lookup_callable()
   File
 "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.20-py2.6.egg/reviewboard/diffviewer/renderers.py",
 line 73, in 
 lambda: self.render_to_string_uncached(request),
   File
 "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.20-py2.6.egg/reviewboard/diffviewer/renderers.py",
 line 87, in render_to_string_uncached
 request=request)
   File
 "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.20-py2.6.egg/reviewboard/diffviewer/diffutils.py",
 line 422, in populate_diff_chunks
 chunks = generator.get_chunks()
   File
 "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.20-py2.6.egg/reviewboard/diffviewer/chunk_gener

Re: Syntax highlighting in Diff Viewer doesn't work after upgrade from 1.7.27 to 2.0.20

2015-11-18 Thread Wesly Chen
It seems to be related to CVS repository. In CVS repository, all the file 
will be trailed with ",v" and the content of CVS files are not similar with 
original one.
However, "cvs diff" can parse and generate the diff file. So the review 
board Diff Viewer should check and parse the lexer based on the original 
filename instead of the one in CVS repository with ",v".  

Wesly Chen於 2015年11月17日星期二 UTC-8下午5時36分20秒寫道:
>
> 2015-11-18 01:34:33,284 - DEBUG - None - wchen - 
> /reviews/r/114/diff/3/fragment/1876/ - Patching file 
> check_mysql_multirow.pl took 0.042870 seconds
> 2015-11-18 01:34:33,409 - ERROR -  - Failed to apply pygments: no lexer 
> for filename u'/home/cvs/OPS/nagios/libexec/check_mysql_multirow.pl,v' 
> found
> Traceback (most recent call last):
>   File 
> "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.20-py2.6.egg/reviewboard/diffviewer/chunk_generator.py",
>  
> line 231, in _get_chunks_uncached
> markup_a = self._apply_pygments(old or '', source_file)
>   File 
> "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.20-py2.6.egg/reviewboard/diffviewer/chunk_generator.py",
>  
> line 654, in _apply_pygments
> encoding='utf-8')
>   File 
> "/usr/lib/python2.6/site-packages/Pygments-2.0.2-py2.6.egg/pygments/lexers/__init__.py",
>  
> line 149, in get_lexer_for_filename
> raise ClassNotFound('no lexer for filename %r found' % _fn)
> ClassNotFound: no lexer for filename u'/home/cvs/OPS/nagios/libexec/
> check_mysql_multirow.pl,v' found
> 2015-11-18 01:34:33,425 - DEBUG - None - wchen - 
> /reviews/r/114/diff/3/fragment/1876/ - Begin: Generating diff chunks for 
> self.filediff id 1876 (/home/cvs/OPS/nagios/libexec/
> check_mysql_multirow.pl,v)
> 2015-11-18 01:34:33,432 - DEBUG - None - wchen - 
> /reviews/r/114/diff/3/fragment/1876/ - End: Generating diff chunks for 
> self.filediff id 1876 (/home/cvs/OPS/nagios/libexec/
> check_mysql_multirow.pl,v)
> 2015-11-18 01:34:33,432 - DEBUG - None - wchen - 
> /reviews/r/114/diff/3/fragment/1876/ - Generating diff chunks for 
> self.filediff id 1876 (/home/cvs/OPS/nagios/libexec/
> check_mysql_multirow.pl,v) took 0.006171 seconds
>
>
> Christian Hammond於 2015年11月17日星期二 UTC-8下午5時29分13秒寫道:
>>
>> Okay, you'll have to add 'import logging' to the line above the logging 
>> statement.
>>
>> Christian
>>
>> -- 
>> Christian Hammond - chri...@beanbaginc.com
>> Review Board - https://www.reviewboard.org
>> Beanbag, Inc. - https://www.beanbaginc.com
>>
>> On Tue, Nov 17, 2015 at 5:09 PM, Wesly Chen  wrote:
>>
>>> I modified 
>>> --
>>> markup_b = self._apply_pygments(new or '', dest_file)
>>> except:
>>> pass
>>> 
>>> to
>>> 
>>> markup_b = self._apply_pygments(new or '', dest_file)
>>> except Exception as e:
>>> logging.exception('Failed to apply pygments: %s', e)
>>> --
>>>
>>> Then restarted memcached/httpd.
>>> loaded a diff file via rbt (rbt post -u -r 114 -I 
>>> check_mysql_multirow.pl)
>>> and I got an error on UI
>>> 
>>>  There was an error displaying this diff.
>>> 
>>> global name 'logging' is not defined
>>>
>>> Details:
>>> Traceback (most recent call last):
>>>   File 
>>> "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.20-py2.6.egg/reviewboard/diffviewer/views.py",
>>>  
>>> line 265, in get
>>> response = renderer.render_to_response(request)
>>>   File 
>>> "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.20-py2.6.egg/reviewboard/diffviewer/renderers.py",
>>>  
>>> line 56, in render_to_response
>>> return HttpResponse(self.render_to_string(request))
>>>   File 
>>> "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.20-py2.6.egg/reviewboard/diffviewer/renderers.py",
>>>  
>>> line 74, in render_to_string
>>> large_data=True)
>>>   File 
>>> "/usr/lib/python2.6/site-packages/Djblets-0.8.22-py2.6.egg/djblets/cache/backend.py",
>>>  
>>> line 111, in cache_memoize
>>> data = lookup_callable()
>>>   File 
>>> "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.20-py2.6.egg/reviewboard/diffviewer/renderers.py",
>>>  
>>> line 73, in 
>>> lambda: self.render_to_string_uncached(request),
>>>   File 
>>> "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.20-py2.6.egg/reviewboard/diffviewer/renderers.py",
>>>  
>>> line 87, in render_to_string_uncached
>>> request=request)
>>>   File 
>>> "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.20-py2.6.egg/reviewboard/diffviewer/diffutils.py",
>>>  
>>> line 422, in populate_diff_chunks
>>> chunks = generator.get_chunks()
>>>   File 
>>> "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.20-py2.6.egg/reviewboard/diffviewer/chunk_generator.py",
>>>  
>>> line 161, in get_chunks
>>> large_data=True)
>>>   File 
>>> "/usr/lib/python2.6/site-packages/Djblets-0.8.22-py2.6.egg/djblets/cache/backend.py",
>>>  
>>> line 111, in cache_memoize
>>> data = lookup_callable()
>>>   File 
>>> "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.20-py2.6.egg/reviewboard/diffvi

Add new users by script

2015-11-18 Thread Sam
Hello,

I would like to add a few number of users to the Web  but I think there is 
no API supporting this.

Is it okay if I just add the users to database?

I tried to insert to auth_user table and I can see the users in Web UI. At 
the login time the password does not work so we try to reset the password 
but the email is not being sent to the users.

Is there any other table that I need to update as well?
What do I need to do for the password when I insert to table?

-- 
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.