Hi,
For syntax hightlighting work properly with cvs diff file, I need the
following patch. If it is ok, please accept it.
I also need tell pygments the encoding is utf-8 for show chinese
character in source code.

diff -pru ReviewBoard-1.0alpha1-py2.4.egg/reviewboard/diffviewer/
diffutils.py /usr/lib/python2.4/site-packages/ReviewBoard-1.0alpha1-
py2.4.egg/reviewboard/diffviewer/diffutils.py
--- ReviewBoard-1.0alpha1-py2.4.egg/reviewboard/diffviewer/
diffutils.py    2009-02-02 13:28:55.000000000 +0800
+++ /usr/lib/python2.4/site-packages/ReviewBoard-1.0alpha1-py2.4.egg/
reviewboard/diffviewer/diffutils.py     2009-02-03 16:45:44.000000000
+0800
@@ -286,7 +283,9 @@ def get_chunks(diffset, filediff, interf
         # XXX Guessing is preferable but really slow, especially on
XML
         #     files.
         #if filename.endswith(".xml"):
-        lexer = get_lexer_for_filename(filename, stripnl=False)
+       if filename[-2:] == ",v":
+               filename=filename[0:-2]
+        lexer = get_lexer_for_filename(filename, stripnl=False,
encoding="utf-8")
         #else:
         #    lexer = guess_lexer_for_filename(filename, data,
stripnl=False)


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To post to this group, send email to reviewboard@googlegroups.com
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to