Team Chat Logs

April 20, 2010

2010 3
Mo Tu We Th Fr Sa Su
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    

[00:02:20.515317]<phrearch>hm, trying to install trac svn 0.12, but i get an error on installation
[00:02:20.931082]<phrearch> File "/usr/local/lib/python2.6/dist-packages/setuptools-0.6c11-py2.6.egg/setuptools/package_index.py", line 475, in fetch_distribution
[00:02:21.133467]<phrearch>AttributeError: 'NoneType' object has no attribute 'clone'
[00:03:59.917277]<scfe>phrearch: yes, this is a setuptools bug
[00:04:09.913484]<scfe>try to install Genshi 0.6 from trunk
[00:04:18.576926]<scfe>that's a workaround for this problem
[00:04:27.260999]<phrearch>aha, or another easy_install version?
[00:05:04.607002]<scfe>if you upgrade setuptools (current trunk or something like that) but for me it was easier to work around that problem.
[00:05:16.966882]<scfe>or switch to 'distribute' ;-)
[00:05:29.883979]<scfe>"easy_install https://svn.edgewall.org/repos/genshi/trunk" should work
[00:05:42.817152]<phrearch>cool thanks
[00:06:13.448309]<phrearch>yea that worked really well
[00:10:12.132725]<phrearch>i read that it can use mysql now as well?
[00:13:12.316174]<scfe>phrearch: I think mysql works kindof
[00:13:25.557938]<scfe>however personally I try to use sqlite for small things
[00:13:39.544510]<scfe>and postgresql when I need 'heavy duty'
[00:14:16.990397]<phrearch>ill try postgresql first then
[00:15:17.337810]<phrearch>hm
[00:15:17.682270]<phrearch>TracError: IOError: zipimport: can not open file /usr/local/lib/python2.6/dist-packages/TracExtendedXmlRpc-0.1-py2.6.egg
[00:15:39.193558]<phrearch>i removed all trac stuff before i install 0.12
[00:15:54.489793]<phrearch>is it keeping track of trac plugins somewhere? :-)
[00:25:08.914044]<phrearch>hm, it fails to load a template file
[00:25:09.329473]<phrearch>http://hwios.org/
[00:25:17.431765]<phrearch>Template "error.html" not found
[00:25:46.951485]<phrearch>somehow its still looking for 0.11
[00:27:52.778199]<phrearch>aha, restarting apache did the trick
[00:35:02.608472]<phrearch>by the way, is there an irc plugin for trac as well?
[00:35:30.904791]<phrearch>i wonder whether i could link a git commit to irc notifications somehow, without using an external service like cia
[00:47:03.265754]<phrearch>not sure how to setup multirepos mode :(
[00:51:33.417463]<kirean>phrearch: you do know about: http://trac-hacks.org/
[00:52:45.181297]<phrearch>kirean: aha thanks. i didnt
[00:58:23.973278]<kirean>phrearch: I think this channel is using the IrcLogsPlugin
[00:58:43.618692]<kirean>phrearch: but someone else might know for sure.. osimons?
[00:59:18.428484]<phrearch>trying to setup multirepos first with 0.12 and the gitplugin. bit hard
[00:59:26.692480]<phrearch>http://github.com/lentil/trac-git-plugin/
[00:59:35.111108]<phrearch>this one is supposed to work
[01:00:23.193833]<phrearch>got repository type on git
[01:00:34.579020]<phrearch>and repository dir to the git dir with HEAD in it
[01:01:13.097388]<phrearch>browsermodule returns an error though: GitError: GIT control files not found, maybe wrong directory?
[01:02:10.949472]<phrearch>hm
[01:02:14.398268]<phrearch>http://trac.edgewall.org/wiki/0.12/TracRepositoryAdmin
[01:02:30.492559]<phrearch>configparser doesnt have to be lowercase necessarily
[01:03:40.305537]<phrearch>http://paste.pocoo.org/show/203957/
[01:03:51.287804]<phrearch>thats a simple fix to allow uppercase as well
[01:15:43.323455]<phrearch>cool, it works :D
[05:25:51.587614]<soul9>hi
[06:08:18.321882]<doki_pen>tclugg: pong
[06:59:27.371378]*retracile spouts something poisonous about mornings.
[07:03:13.971879]<soul9>is trac 1.0 out?
[07:03:20.731665]<soul9>in gentoo i seem to only have 0.11
[07:04:48.043397]<talley>1.2 is the latest
[07:05:00.951779]<talley>lol how about reading the topic
[07:11:15.936157]<retracile>soul9: 0.11 is the latest stable release.
[07:11:29.254569]<retracile>soul9: 0.12 is the next release, which should be out "real soon now".
[07:17:11.757220]<soul9>so
[07:17:14.775655]<soul9>http://trac.edgewall.org/wiki/TracMultipleProjects
[07:17:29.645552]<soul9>here they say "Multiple Project handling for post-1.0 Trac"
[07:17:36.641536]<soul9>that means post-0.10?
[07:19:34.406818]<Bananobot>Does anyone have a good solution for making the output of a macro searchable?
[07:20:13.185184]<Bananobot>Specifically, I want the wiki page to show up when someone searches for a word that would be present in the output of a macro in that page
[07:21:34.983210]<talley>soul9: no, it means post 1.0, so it is not yet supported
[07:25:05.984966]*soul9 doesn't get it but shuts up
[07:26:51.561580]<soul9>and so i need to install a separate trac install manually for each project?
[07:26:58.501263]<soul9>:P
[07:27:01.171053]<soul9>okok i rtfm
[07:28:38.002098]<retracile>soul9: look into tracforge
[07:29:51.993127]<soul9>o
[07:32:07.777983]<retracile>soul9: much of what Trac "doesn't support" is available as a plugin on trac-hacks.org.
[07:34:34.802451]<soul9>nice thanks
[07:36:55.476049]<Bananobot>Hm... I'm not seeing an extension point that lets me modify the wiki text before it's added to the database. I see listeners present *after* the database commit.
[07:38:20.802666]<Bananobot>I see IWikiPageManipulator.prepare_wiki_page, but it says that isn't called.
[08:09:49.085319]<Sumpen>Hi! Im trying to set up Trac on Fedora with MySQL, apache and mod_wsgi. I've tested the environment configuration according to: http://trac.edgewall.org/wiki/TracModWSGI and everything seems to be working. When trying to load the Trac project though i get this: http://paste.lisp.org/display/98040 Not sure if its a lot of files missing or what it is. ..
[08:52:14.804774]<nielk>hi, got some questions regarding the trac.config module
[08:54:27.996580]<nielk>in trac.config.Option.__get__(...) it states: config = getattr(instance, 'config', None) - however, I am unable to find where the config attr will ever be set when using for example foo = ListOption(...)
[08:55:34.593212]<cmc>what are you trying to do?
[08:57:29.716932]<nielk>the main reason for asking is, that I wanted to access the option's value in ListOption in a static context, i.e. on the class level rather than the instance level, however, that seems not to be possible with the current approach of Options being descriptors
[08:58:05.670839]<nielk>i finally ended with a simple helper class that i would then instantiate and a simple generator method on that instance for getting the actual values from the option
[08:58:22.212096]<nielk>is it possible to access the option's value in a more static context?
[08:58:37.145288]<cmc>you'd need the current environment, so you'd need to pass that in
[08:58:58.512162]<nielk>ah, so the instance is the environment?
[09:00:02.069620]<cmc>look at trac/config.py : Configuration
[09:00:12.634605]<cmc>looks like you just need to give it a filename
[09:00:34.323437]<nielk>oh, that is what you mean, well I will post it to pastebin for clarifying things a bit ;)
[09:02:24.422861]<nielk>http://paste.lisp.org/+23NF
[09:03:25.537813]<nielk>perhaps you got some time looking into this, it is not much code there
[09:04:01.365933]<nielk>and another question, where does the 'config' attr comes from that is mentioned in Option.__get__() : config = getattr(instance, 'config', None)
[09:10:37.874700]<nielk>dear me, searching the code base found that in trac.env#component_activated the config attr will be set, so my attempt will actually not work ;)
[09:11:22.745311]<cmc>you should be able to create your own Configuration object though
[09:13:04.892417]<nielk>I will try, thanks for the hint, although that would mean some performance impact on the system
[09:13:31.954380]<cmc>I suggest not using a static context
[09:14:19.242705]<nielk>Well, yes, that would do, but it is actually considered a static and thus system wide configuration and not something that should be gotten from an instance... well I will try to refactor
[09:16:59.194732]<cmc>hah, we can get into the reasons why singletons are antipatterns later :)
[09:17:07.494964]<nielk>lol
[09:18:31.516009]<nielk>actually, the reason for this is, that i do not always want to create a new instance of the RedirectionSystem component for merely accessing the configuration
[09:19:06.850650]<gmpff>hi.
[09:19:17.681838]<cmc>right, you shouldn't need to; the env is passed around to every component
[09:19:37.073964]<gmpff>I'm having trouble debugging a plugin that does not work. Problem is that it does *nothing*; i.e. can't see any signs of it activating or installing.
[09:19:42.821081]<gmpff>Any advice ?
[09:20:00.601217]<cmc>gmpff: run tracd with logging set to debug send to stdout
[09:20:09.417080]<gmpff>cmc: thanks.
[09:20:11.101227]<gmpff>lemme do that.
[09:20:19.721494]<cmc>when the first page is loaded, it'll give you a list of all loaded plugins
[09:20:23.090164]<nielk>same problem here, have you tried interactively running python and importing bits from the modules of your codebase?
[09:21:01.307854]<gmpff>the plugin doesn't show on the admin page.
[09:21:35.388699]<gmpff>but I'll check the debugging traces now. That's what I was looking for.
[09:21:47.509163]<nielk>in my plugin it showed, that i got some basic import paths wrong, referring to RedirectionSystem.model when it should be only model. And, yes, some circular dependencies where also in there...
[09:23:32.451940]<nielk>wonder why pydev/eclipse does not report such cyclic dependencies ;)
[09:28:44.781820]<FlaPer87>hey guys, In the track wiki, how can I include a wiki page into the one I'm editing?
[09:28:48.060018]<FlaPer87>is it possible?
[09:29:03.193591]<cmc>nielk: why don't you make your RedirectionSystem extend from an intermediary class which loads the listoptions on init?
[09:30:37.155746]<cmc>FlaPer87: http://trac-hacks.org/wiki/TracSubPagesMacro
[09:30:43.401678]<cmc>there are probably others
[09:30:58.327881]<nielk>cmc: would basically be the same, an instance is still required, but thanks. I am currently lookinginto the component manager for finding out whether it provides instances of the components that I can reuse
[09:31:07.774639]<nielk>cmc: i will look into that
[09:32:52.322809]<nielk>cmc: thx for the link but that plugin does not even provide source access ;)
[09:33:18.345776]<gmpff> cmc: thanks. I now know I'm missing some dependencies.
[09:33:43.227909]<cmc>nielk: sorry, that macro was directed at FlaPer87
[09:33:51.524166]<cmc>gmpff: glad to help, good luck
[09:34:11.574860]<nielk>ups, got that wrong, np
[09:34:45.369776]<nielk>err, how do I pm someone, has been a tid bit of time since last doing irc (10yrs+ ;)
[09:39:59.110899]<nielk>ah, RTFM yielded msg - will use that now
[09:46:32.313821]<Bananobot>I'm trying to extend the wiki syntax, but I can't seem to get an expression to match across more than one line. I'm currently matching r"a-a\s+#!comment BEGIN AUTOGEN test a-a" against "a-a #!comment BEGIN AUTOGEN test a-a" in the wiki content, which works just fine, but if I change that first space in the second string to a line break, it no longer matches.
[09:48:42.848560]<nielk>this is the way the parse works, it will match only on a per line basis
[09:49:16.411676]<nielk>see the implementation of {{{ ... }}} for more information
[09:49:26.605575]<Bananobot>Where is that defined?
[09:51:56.940964]<nielk>see for example trac.wiki.formatter.Formatter#format
[09:52:19.304154]<nielk>_inner_table_re = re.compile(r"""\s*
[09:52:19.512574]<nielk> <table[^>]*>\s*
[09:52:19.525304]<nielk> ((?:<tr[^>]*>)?
[09:52:19.537486]<nielk> (.*?)
[09:52:20.173376]<nielk> (?:</tr>)?)\s*
[09:52:20.377080]<nielk> </table>\s*$
[09:52:21.159224]<nielk> """, re.MULTILINE | re.DOTALL | re.VERBOSE)
[09:52:40.771738]<nielk>this is also in the same module, perhaps this would be your solution?
[09:53:38.555491]<nielk>the above is part of trac.wiki.formatter.WikiFormatter
[09:54:16.897575]<Bananobot>I don't see that in trac.wiki.formatter
[09:54:40.288251]<nielk>oh well, i am using trac-dev0.12, perhaps you are using a different code base?
[09:54:43.198083]<Bananobot>I don't see the WikiFormatter class at all
[09:54:47.630716]<Bananobot>I'm on 0.11
[09:55:00.584388]<nielk>sry, I meant WikiProcessor
[09:56:33.249593]<nielk>I wonder why there is no singleton (your stance, cmc ;) for the environment in the system. Since trac is a single environment, and shares all of its configuration with any of the components instantiated by the single component manager in the system (aka environment)
[09:57:04.505915]<Bananobot>What I'm trying to do is hook into the parsing process so automatically generate content between two specially-named comments. This would allow the content to be generated dynamically while still being searchable.
[09:57:13.388813]<Bananobot>But it doesn't look like the implementation is going to be clean
[09:57:49.975633]<cmc>nielk: fewer singletons means easier tests and less tangled code
[09:57:55.180123]<nielk>ah well i see, ComponentMeta will already provide for single instances per class on __new__, forget my initial statement
[09:58:43.860016]<cmc>now, I'm not a trac programmer, but I do like the way that they've laid everything out
[09:58:59.781366]<nielk>or rather Component, not ComponentMeta
[09:59:00.890019]<Bananobot>It needs more hooks
[09:59:16.560160]<cmc>Bananobot: you can hook in to Genshi if you want
[09:59:20.535449]<nielk>^^me too, but it is quite difficult to understand, they must be all python magicians
[09:59:36.302283]<cmc>nielk: I hear you! it's dense
[10:00:22.900503]<Bananobot>I think I'm just going to give up on this endeavor.
[10:00:53.291378]<Bananobot>I've explored like 5 different approaches, and I keep hitting dead ends. I'll have to modify the core Trac code to get what I want.
[10:01:04.882742]<cmc>Banaobot: IRequestFilter might work for you as well
[10:01:39.579572]<nielk>what exactly are you trying to solve with your wiki syntax extension?
[10:02:36.310932]<Bananobot>Basically, I'd like the ability for something in the wiki markup to trigger some custom code that can modify the wiki page being parsed and change the wiki content in the database
[10:03:23.233748]<nielk>oh, uh, sounds complicated to me, so basically you would require a macro that then would update content in the database, would you not?
[10:03:25.072392]<Bananobot>And I'm not an experience Python programmer, which is making this more difficult for me
[10:04:08.456704]<Bananobot>nielk: With a macro, I would also need to modify the wiki content. The content that is produced by this custom code will need to be present in the page content itself, so it can be searchable
[10:04:22.119221]<Bananobot>So, i can't just have the macro return the output.
[10:04:50.278664]<nielk>perhaps something along the line of [[MyContentManipulatingMacro(<referring wiki page id>, data)]]
[10:05:09.387440]<nielk>the macro then would be able to both output and change the content of the referring wiki page
[10:05:24.190583]<Bananobot>Could it also change the in-memory content being parsed?
[10:05:39.702980]<nielk>difficult since that is out of scope
[10:05:42.728311]<nielk>IMHO
[10:06:23.029401]<Bananobot>The output will exist in the wiki content, surrounded by special comments. So, on reload, that previous output will already be there in the wiki content. The macro/plugin would need to replace that content with the new output
[10:07:37.130301]<Bananobot>All I'm really trying to achieve is make the output of this plugin searchable.
[10:07:38.954485]<nielk>so you are actually fetching some dynamic data from a given source and putting that into the wiki content?
[10:07:50.989898]<Bananobot>nielk: Yeah
[10:08:07.141178]<nielk>perhaps you should look into the search module, it provides hooks for implementing your own search provider
[10:08:12.186418]<Bananobot>Specifically, it runs a PHP script that return information about our websites.
[10:08:20.868249]<Bananobot>This is our website hosting documentation
[10:10:20.246647]<nielk>that way you would not be required to modify any wiki page content
[10:11:04.521393]<Bananobot>In the search results, I'll want it to link to the wiki page. If I implement it as a separate source, would that sometimes result in two search results going to the same place?
[10:11:22.669687]<Bananobot>Can I somehow intercept the default wiki search handler to also match against a second table?
[10:11:51.692601]<cmc>Bananobot: I think http://trac-hacks.org/wiki/AddCommentMacro modified the wiki data
[10:12:05.346719]<nielk>of course, you are free to implement your search provider so that it for example will query either a remote or local data source, whatever
[10:13:54.447154]<nielk>it does, but the use case here is different, i think
[10:15:14.519926]<nielk>you must not intercept the default handler, it will call you (framework so to say) by you having implemented the correct extension point interface, e.g. trac.search.api.ISearchSource
[10:15:35.699024]<Bananobot>cmc: I'm not sure that's quite the same thing, but it does provide some good reference code for getting the wiki page object and stuff. Thanks
[10:16:42.989525]<nielk>actually, from what i gathered from your input, you have some sort of cms for keeping your site documentation up to date, i think that you would not want it to be replicated into the wiki, do you?
[10:18:05.838290]<cmc>if you're in to web services, you can routinely push to the trac site via xmlrpc
[10:18:41.038970]<Bananobot>nielk: Not really a CMS. It's just some code I wrote to read our Apache configuration, inspect the various website files, and return detailed information about what's hosted on our sites. There isn't really a UI for it yet. I want all of that to automatically appear in the wiki
[10:18:54.609787]<Bananobot>nielk: And I already have that working, except it isn't searchable
[10:19:02.862683]<Bananobot>I'm using a macro right now
[10:19:38.660187]<nielk>coming back to the single component manager in the system, aka environment, aka env. would it be possible for web/main/dispatch_request to make this single instance available on a more public scope, so that one would not have to have a premade reference to it , or does that yield problems when running trac-admin?
[10:20:55.695989]<Bananobot>cmc: Hmm... that actually might work pretty well. I had attempted that sort of thing using the trac-admin functions, but they didn't really work for updating wiki content.
[10:22:56.085349]<cmc>nielk: I'd think that'd cause problems with mulit-site trac instances; I think they all with within the same trac parent
[10:23:29.635623]<nielk>yes
[10:25:02.654640]<nielk>and since that is so, why not make the environment instance globally available once set up, so that one could query the component manager instance = env[ MyComponent ] instead of having to have an instance reference to env?
[10:25:20.701734]<nielk>from a static context, that is
[10:26:31.564748]<cmc>because the different sub projects would have different environments
[10:26:40.610678]<nielk>as of now, you would always be required to have an instance context, and by that, always also, to be within a request context, since otherwise you will not have an instance of env available, but then i think it is also a bootstrapping issue
[10:27:16.237576]<nielk>with the component classes and modules being initialized prior to that any request takes place
[10:28:05.509067]<nielk>ah, well, just figured out that it is a bootstrapping issue of the component manager and python instantiating class objects, i will refactor my code ;)
[10:36:23.391397]<nielk>a provable workaround for making configuration items available in a static context would be to setattr( class, name, value ) in __init__ -- thanks for the input so far!
[13:45:07.136039]<nielk>hi everyone, i got some questions regarding similar purpose components and their priorities in which they will be executed
[13:46:28.162290]<nielk>say, some component, lets call it a tree renamer/mover that will listen by the existing new wiki page change listener interface (wiki page name changed event) would then rename all subtree pages
[13:47:10.892722]<nielk>say, another component, responsible for redirecting links to the newly renamed pages will also listen on the (wiki page name changed event)
[13:47:44.405162]<nielk>is there some kind of guarantee that the first will run before the second?
[13:54:16.628594]<cmc>I don't believe so, though in practice it is alphabetic
[13:55:20.643616]<cmc>at least, everything seems to work out okay that way. I haven
[13:55:25.350034]<cmc>'t had any problems
[13:57:07.116336]<nielk>ok, thanks for the info
[14:08:24.826474]<flakrat_>in trac .11.4, is it possible to remove a specific version of a page? for example, I managed to include something in the wiki page that doesn't need to be visible
[14:08:50.886467]<flakrat_>I changed the wiki page, however the data is still visible if I look at the previous versions
[18:51:39.752340]<jdunck>hello all -- i have a question about integrating a trac plugin with existing core features.
[18:51:58.054609]<jdunck>specifically, i'd like to do something when a ticket gets updated. can someone point to an example?
[18:53:01.641305]<jdunck>mitsuhiko: i don't suppose you've done a trac plugin :-)