Re: [Trac] Re: Syntax highlighting in SVN repo only with svn:mime-type property set

2022-02-09 Thread Jun Omae
Thanks for the feedback!
I've filed the issue at https://trac.edgewall.org/ticket/13459, and
the issue will be fixed in Trac 1.5.4.

On Wed, Feb 9, 2022 at 6:46 PM Alexander Lunev  wrote:
>
> Yes, this patch is a fix! Thank you!
>
> ср, 9 февр. 2022 г. в 01:39, Jun Omae :
>>
>> Hi,
>>
>> On 2022/02/08 15:53, Alexander Lunev wrote:
>> > Oh, sorry, Trac version is 1.5.3. Syntax coloring works in source code 
>> > (SVN) only when svn:mime-type set. In Wiki coloring works when set wiki 
>> > processor, like
>> > {{{
>> > #!php
>> > > > if (true) {
>> > }
>> > ?>
>> > }}}
>>
>> Thanks. Reproduced with Subversion repository on my environment.
>> Could you please try the following patch?
>>
>> [[[
>> diff --git a/tracopt/versioncontrol/svn/svn_fs.py 
>> b/tracopt/versioncontrol/svn/svn_fs.py
>> index b5fd52854..bac8fa157 100644
>> --- a/tracopt/versioncontrol/svn/svn_fs.py
>> +++ b/tracopt/versioncontrol/svn/svn_fs.py
>> @@ -827,7 +827,7 @@ class SubversionNode(Node):
>>   def _get_prop(self, name):
>>   value = fs.node_prop(self.root, self._scoped_path_utf8, name,
>>self.pool)
>> -return to_unicode(value)
>> +return _from_svn(value)
>>
>>   def get_branch_origin(self):
>>   """Return the revision in which the node's path was created.
>> ]]]

-- 
Jun Omae  (大前 潤)

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/CAEVLMajHpKTKD3uMZ%2B-idv9VeE%3DM33Eji6HJm7gUHFYFSB6HkA%40mail.gmail.com.


Re: [Trac] Re: Syntax highlighting in SVN repo only with svn:mime-type property set

2022-02-09 Thread Alexander Lunev
Yes, this patch is a fix! Thank you!

ср, 9 февр. 2022 г. в 01:39, Jun Omae :

> Hi,
>
> On 2022/02/08 15:53, Alexander Lunev wrote:
> > Oh, sorry, Trac version is 1.5.3. Syntax coloring works in source code
> (SVN) only when svn:mime-type set. In Wiki coloring works when set wiki
> processor, like
> > {{{
> > #!php
> >  > if (true) {
> > }
> > ?>
> > }}}
>
> Thanks. Reproduced with Subversion repository on my environment.
> Could you please try the following patch?
>
> [[[
> diff --git a/tracopt/versioncontrol/svn/svn_fs.py
> b/tracopt/versioncontrol/svn/svn_fs.py
> index b5fd52854..bac8fa157 100644
> --- a/tracopt/versioncontrol/svn/svn_fs.py
> +++ b/tracopt/versioncontrol/svn/svn_fs.py
> @@ -827,7 +827,7 @@ class SubversionNode(Node):
>   def _get_prop(self, name):
>   value = fs.node_prop(self.root, self._scoped_path_utf8, name,
>self.pool)
> -return to_unicode(value)
> +return _from_svn(value)
>
>   def get_branch_origin(self):
>   """Return the revision in which the node's path was created.
> ]]]
>
> --
> Jun Omae  (大前 潤)
>
> --
> You received this message because you are subscribed to the Google Groups
> "Trac Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to trac-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/trac-users/498ae396-733e-442c-d9c3-8359ae7212d7%40gmail.com
> .
>


-- 
your sweet isn't ready yet

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/CABk4_A7%2BmOr9rR38N6kbpjFm-QtuYhPwL3uU5%3DY575zqmKrhuQ%40mail.gmail.com.


Re: [Trac] Re: Syntax highlighting in SVN repo only with svn:mime-type property set

2022-02-08 Thread Jun Omae

Hi,

On 2022/02/08 15:53, Alexander Lunev wrote:

Oh, sorry, Trac version is 1.5.3. Syntax coloring works in source code (SVN) 
only when svn:mime-type set. In Wiki coloring works when set wiki processor, 
like
{{{
#!php

}}}


Thanks. Reproduced with Subversion repository on my environment.
Could you please try the following patch?

[[[
diff --git a/tracopt/versioncontrol/svn/svn_fs.py 
b/tracopt/versioncontrol/svn/svn_fs.py
index b5fd52854..bac8fa157 100644
--- a/tracopt/versioncontrol/svn/svn_fs.py
+++ b/tracopt/versioncontrol/svn/svn_fs.py
@@ -827,7 +827,7 @@ class SubversionNode(Node):
 def _get_prop(self, name):
 value = fs.node_prop(self.root, self._scoped_path_utf8, name,
  self.pool)
-return to_unicode(value)
+return _from_svn(value)

 def get_branch_origin(self):
 """Return the revision in which the node's path was created.
]]]

--
Jun Omae  (大前 潤)

--
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/498ae396-733e-442c-d9c3-8359ae7212d7%40gmail.com.


Re: [Trac] Re: Syntax highlighting in SVN repo only with svn:mime-type property set

2022-02-08 Thread Alexander Lunev
Oh, sorry, Trac version is 1.5.3. Syntax coloring works in source code
(SVN) only when svn:mime-type set. In Wiki coloring works when set wiki
processor, like
{{{
#!php

}}}

вт, 8 февр. 2022 г. в 05:23, RjOllos :

>
>
> On Monday, February 7, 2022 at 7:05:06 AM UTC-8 sol...@gmail.com wrote:
>
>> Hello everybody!
>> My Trac installation will not do syntax highlighting based on file
>> extension in Subversion repository browser, only when I set it explicitly,
>> like:
>>
>> svn propset svn:mime-type "`file -bi start.pl`" start.pl
>>
>> Only then syntax highlighting works, for this file only.
>> Do I have to set this property on all files to see them highlighted?
>>
>> --
>> With best regards!
>> Alexander
>>
>
> It shouldn't be necessary to set the mime-type, at least for recent Trac
> versions. Which Trac version are you running?
>
> https://trac.edgewall.org/wiki/TracSyntaxColoring
>
> Ryan
>
> --
> You received this message because you are subscribed to the Google Groups
> "Trac Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to trac-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/trac-users/d953b301-8c3c-47c6-aa30-795dd5f27fdcn%40googlegroups.com
> 
> .
>


-- 
your sweet isn't ready yet

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/CABk4_A6ba-W%3D7%3D3KtXL6juEZzC8rrh6NpQOwpkgd%3DP1Bj9bjxA%40mail.gmail.com.