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 <javascript:>
> Review Board - https://www.reviewboard.org
> Beanbag, Inc. - https://www.beanbaginc.com
>
> On Wed, Nov 18, 2015 at 3:02 PM, Wesly Chen <wesly...@gmail.com 
> <javascript:>> 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 
>>> <http://www.google.com/url?q=http%3A%2F%2Fcheck_mysql_multirow.pl&sa=D&sntz=1&usg=AFQjCNFa-8zf-m7y5RN4TmkMwBiTAOaacg>
>>> ,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 <wesly...@gmail.com> 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.

Reply via email to