[Trac] Re: multiple repository trac link format

2022-03-19 Thread RjOllos


On Friday, March 18, 2022 at 3:49:51 PM UTC-7 galens wrote:

> Hello again,
>
> I'm still climbing the learning curve here, having jumped from trac 0.10.5 
> to 1.5.3.  Now that multiple repositories are supported, what is the 
> preferred format for trac links that reference a non-default repository?  I 
> can't seem to find this mentioned in the documentation.  Through some 
> searching I discovered that the following seems to work:
>
> changeset:git_short_hash/repo
>

There are examples throughout this page, particularly in this section:
https://trac.edgewall.org/wiki/TracLinks#VersionControlsystemlinks
 

> Are there other approved formats?  Since git hashes are unlikely to 
> collide, is there a git-specific format that avoids the need to specify the 
> repository?
>

Please see this section:
https://trac.edgewall.org/wiki/TracRepositoryAdmin#DefaultRepository

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/507dac27-f69a-4f6f-9fa9-43f0209e60efn%40googlegroups.com.


Re: [Trac] Re: TestManagerForTracPlugin not working

2022-03-19 Thread Roberto Longobardi
The previous releases were not compatibile with Trac 1.4 because of a
mistake in setting up my test environment.

I've just fixed all incompatibilities with Trac 1.2 and with Trac 1.4 and
cleaned up all the releases.

Now you will find that:

   - Releases 1.9.x are compatible with Trac 0.12.x.
   - Releases 1.20.x are compatible with Trac 1.2.x.
   - Releases 2.x are compatible with Trac 1.4.x.

Unfortunately there is currently no release compatible with Trac 1.5,
because of the dropped support of Genshi, a technology the plugins are
heavily based on.

Please, refer to the releases page for the available downloads:
https://github.com/seccanj/testman4trac/releases


Kind regards.

Roberto



Il giorno lun 14 mar 2022 alle ore 19:53 RjOllos  ha
scritto:

>
>
> On Monday, March 14, 2022 at 11:06:58 AM UTC-7 sec...@gmail.com wrote:
>
>> OK thanks Ryan.
>>
>> I'm facing some final problems with Genshi templates in Trac 1.4.3.
>>
>> It looks like Trac is trying to render my templates with Jinja2 instead
>> of Genshi...
>>
>> Is there anything I should do to force Genshi to render my templates?
>>
>> Here is the stack trace:
>>
>> 18:47:17 Trac[main] DEBUG: Rendering response with template
>> testmanagerstats.html
>> 18:47:17 Trac[web_ui] DEBUG: TestManagerTemplateProvider init
>> 18:47:17 Trac[wiki] DEBUG: WikiTestManagerInterface init
>> 18:47:17 Trac[workflow] DEBUG: TestManagerWorkflowInterface init
>> 18:47:17 Trac[chrome] ERROR: Jinja2 UndefinedError error while rendering
>> XML/HTML template
>> Traceback (most recent call last):
>>   File
>> "/home/roberto/Documenti/build/pve-trac14-vero/lib/python2.7/site-packages/trac/web/chrome.py",
>> line 1706, in _iterable_jinja_content
>> for chunk in stream:
>>   File
>> "/home/roberto/Documenti/build/pve-trac14-vero/lib/python2.7/site-packages/jinja2/environment.py",
>> line 1357, in __next__
>> return self._next()
>>   File
>> "/home/roberto/Documenti/build/pve-trac14-vero/lib/python2.7/site-packages/jinja2/environment.py",
>> line 1334, in _buffered_generator
>> c = next(self._gen)
>>   File
>> "/home/roberto/Documenti/build/pve-trac14-vero/lib/python2.7/site-packages/jinja2/environment.py",
>> line 1125, in generate
>> yield self.environment.handle_exception()
>>   File
>> "/home/roberto/Documenti/build/pve-trac14-vero/lib/python2.7/site-packages/jinja2/environment.py",
>> line 832, in handle_exception
>> reraise(*rewrite_traceback_stack(source=source))
>>   File
>> "/home/roberto/.cache/Python-Eggs/TestManager-1.10.3-py2.7.egg-tmp/testmanager/templates/testmanagerstats.html",
>> line 125, in top-level template code
>> ${m['name']}
>>   File
>> "/home/roberto/Documenti/build/pve-trac14-vero/lib/python2.7/site-packages/jinja2/environment.py",
>> line 452, in getitem
>> return obj[argument]
>> UndefinedError: 'm' is undefined
>>
>>
>> And the relevant template code, where it looks like the "py:for"
>> directive is not understood nor run:
>>
>> > PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
>> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;>
>> http://www.w3.org/1999/xhtml;
>> xmlns:xi="http://www.w3.org/2001/XInclude;
>> xmlns:i18n="http://genshi.edgewall.org/i18n;
>> xmlns:py="http://genshi.edgewall.org/;
>> i18n:domain="testmanager"
>> >
>> 
>> 
>>
>> # import 'macros.html' as jmacros with context
>>
>> [...]
>> 
>> All Test Plans
>> 
>> ${m['name']}
>> 
>> 
>>
>>
>> And the code I use to render the template:
>>
>> class TestStatsPlugin(Component):
>> implements(INavigationContributor, IRequestHandler, ITemplateProvider,
>> IPermissionRequestor)
>>
>> [...]
>> def process_request(self, req):
>> [...]
>> return 'testmanagerstats.html', data
>>
>>
>> Any help is appreciated. Thanks.
>> Roberto
>>
>
> You'll need to return:
>
>  return 'testmanagerstats.html', data, None
>
> in order to tell Trac that the template being rendered is a Genshi
> template. Also, you can't use "import ... jmacros" in a Genshi template,
> that's Jinja2 syntax.
>
>
> https://trac.edgewall.org/wiki/TracDev/PortingFromGenshiToJinja#IRequestHandler
>
> 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/a7b670fa-a7be-453d-9c4b-f425df3a380bn%40googlegroups.com
> 
> .
>

-- 
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/CAJkkV1HDp0-2j%2BpTFmQ%2Bonm8j88eyiVTk1wp53xY-yRV9gGEYw%40mail.gmail.com.