Team Chat Logs

July 11, 2010

2010 6
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 31  

[05:53:11.242457]<slam>howdy
[09:30:23.222503]<rts>when developing plugins or extensions for trac, which license would be best? personally i'd prefer the GPLv3 - but I am not sure whether this is compatible with the license statement found in trac or genshi or other software from edgewall.org - any suggestions?
[09:40:55.645072]<mahound>i need some help on http://trac.edgewall.org/browser/trunk/tracopt/ticket/commit_updater.py#L172
[09:41:06.428628]<mahound>how is it supposed to work?
[10:05:23.598598]<rts>mahound: see IRepositoryChangeListener and the VersionControlAdmin class for more information on this. Basically you would have to integrate some commit hook script which then will cause the version control admin to notify available repository change listeners
[10:15:25.971909]<mahound>rts, i know how it works, but i'm talking about this method specifically (_is_duplicate)... i don't understand what it is being used for
[10:31:30.921846]<rts>mahound: well. okay, will have a second look then
[10:33:57.681969]<rts>mahound: well, basically it is an internal method that is called upon changeset_added or _modified, what it basically does is prevent adding the same changeset twice or multiple times, for example when you call the application with the same changeset over and over again
[10:34:57.045585]<mahound>rts, ahh ok, that kind of protection... because i was thinking about patching it to detect duplicate commits caused by merges (as it happens in git, for instance)
[10:36:15.691554]<rts>mahound: i think that you are better off with a git hook script, for preventing such issues
[10:37:46.073030]<mahound>rts, what do you mean? filtering it out at the hook script level_
[10:37:46.970108]<mahound>?
[10:38:55.062614]<rts>mahound: of course, if that is possible with git, because filtering it out at the trac level means that your hook script already ran and delegated the event to trac-admin ...
[10:40:11.876164]<mahound>rts, which i don't know if it is a desirable behavior or not... i mean, after all the commit is being added, even if to some other branch
[10:40:49.545471]<mahound>and i guess ticket handling is not the only thing "revision added" does, right?
[10:48:34.864986]<rts>mahound: you meant 'changeset added', or did you not?
[10:48:47.166245]<rts>mahound: please specify what you are actually trying to do
[10:48:57.268042]<mahound>yes, "changeset added"
[10:50:07.437176]<mahound>rts, i am using the ticket commit updater, but it doesn't work very well with git, since if i merge a branch into another one, the commits are added to the latter
[10:50:17.518518]<mahound>so, the ticket will be modified again
[10:50:47.312055]<mahound>and since i need to close tickets belonging to both branches...
[10:50:58.843885]<mahound> i can't just ignore one of them
[10:51:36.443771]<rts>mahound: so when you merge, the commit messages will be replayed, causing the ticket updater to once again modify existing tickets with the same messages?
[10:53:45.352665]<rts>mahound: sounds to me like you need some hook script that will strip commit messages from individual patches in the branch upon merge
[10:54:12.223850]<mahound>rts, yes, that's the problem
[10:55:40.110357]<mahound>rts, that would cause the git commit to have a different id from the original one, no? and that
[10:55:45.377471]<mahound>*that's not cool
[10:57:17.909896]<rts>mahound: hm, then why not include the commit id in the comment that is placed into each ticket on initial commit. now, when merging, you would then check whether the same commit id is already in the list of comments
[10:57:27.578847]<rts>mahound: and if so, simply skip the ticket
[10:59:31.711377]<rts>mahound: getting the commit id from the revision id should not be too difficult, or is it?
[11:01:22.007468]<mahound>rts, no, i guess not... in fact i'm not sure there's even a difference between revision and commit ids for the git plugin
[11:03:16.659360]<rts>mahound: i don't know git that well, never having used it beyond looking into its documentation, so i guess you have to figure it out yourself ;)
[11:03:17.790522]<mahound>is there such a difference in svn?
[11:03:30.341298]<rts>mahound: not that i know of
[11:04:18.074452]<mahound>well, in git there are actually only commits... it's just a tree of commits, with branches being the leaves of the tree
[11:04:21.985998]<rts>mahound: but then again, with subversion you do not have atomic patch sets, representing individual commits that then get replayed upon merge
[11:04:48.942576]<mahound>rts, yes, that's true... and trac is still a bit svn-oriented :/
[11:05:54.737661]<rts>:D
[11:06:37.650378]<rts>mahound: i am considering moving to mercurial, wonder how trac can cope with that, but for the time being i stick with subversion
[11:06:57.790791]<mahound>maybe there could be an option under commit_updater for this? like "ignore commit replays" or something like that...
[11:07:30.112782]<mahound>but imho, ideally this would be something that would be handled by the VC plugin
[11:08:31.989935]<rts>mahound: issue a ticket for it as a feature request
[11:09:31.745363]<mahound>rts, i could even produce a patch
[11:09:39.077097]<mahound>i will open a ticket
[11:09:43.470330]<rts>great !
[11:09:46.735170]<mahound>and see if i can hack something
[11:10:06.894585]<rts>good look with that!
[11:19:29.514037]<mahound>thanks
[11:37:06.230609]<evil_twin>t.e.o: Ticket #9495 (CommitTicketUpdater - git and replayed commits) created - <http://trac.edgewall.org/ticket/9495> - pferreir
[12:12:12.072639]<evil_twin>t.e.o: Ticket #9495 (CommitTicketUpdater - git and replayed commits) updated - <http://trac.edgewall.org/ticket/9495#comment:1> - anonymous
[12:12:54.788403]<rts>hmpf, actually it was me, but insomnia persists on using konqueror... need to change the irc client
[15:27:16.959258]<prologic>Q: (In a template) how do you reference the current context ?
[15:27:29.972530]<prologic>not a specific object in the context
[15:31:57.028067]<osimons>prologic: context? from your data dict, or?
[15:33:18.897103]<prologic>yes
[15:33:31.871786]<osimons>the data dict you return from templates gets expanded, so data['hello'] value will be available as just 'hello' variable
[15:33:32.720335]<prologic>I need a reference to it (from within the template)
[15:33:49.349380]<osimons>${hello}
[15:33:59.646809]<prologic>is there no way to access/reference the context object itself though ?
[15:35:20.485673]<osimons>not really - from the template perspective the context is "everywhere". both what is added by data, what is available from genshi and what gets added by the Trac chrome module +++ for common functions used in templates
[15:35:50.040514]<prologic>gah
[15:36:14.068204]<prologic>I need access to it so that a function I call within the tempalte (passed to it via data/context) can be modified
[15:36:39.222397]<prologic>let me say that again
[15:36:53.270236]<prologic>a function called within the template (passed to the template) can modify the template's context
[15:37:21.053351]<prologic>that's what I need
[15:38:53.966481]<osimons>a <?python .....> block perhaps?
[15:39:10.631170]<prologic>no the function is outside of the template
[15:39:36.426899]<osimons>then why don't you pass in a modified function then?
[15:41:01.522580]<osimons>when you say template/context do you mean the compiled template as genshi provides it, or do you mean changing something each time it renders (where all data, default or provided is supplied)?
[15:41:22.141299]<prologic>the latter
[15:41:33.831608]<prologic>changing something supplied ro the template or adding to it
[15:42:32.688263]<osimons>a post_process_request() will give you access to data from any handler, and before rendering. you may for instance supply an alternative function or tweak data from there.
[15:42:42.181736]<osimons>see IRequestFilter interface
[15:43:17.662834]<prologic>umm no, not Trac
[15:43:20.774337]<prologic>I'm only using genshi
[15:44:28.930739]<osimons>prologic, then #python-genshi is what you want. here you will get the trac-angle on all answers....
[15:44:51.008315]<prologic>oh :)
[15:44:59.739824]<prologic>my bad I didn't realize genshi actualyl had an irc channe :)
[15:45:01.440802]<prologic>channel
[15:45:42.791174]<osimons>it does. not to bring your hopes up too much though - it is not a high-volume channel...
[15:46:22.556832]<prologic>nps
[16:18:24.946116]<hipe>is it retarded to try to run a virtualenv under mod_wsgi and apache?
[16:18:31.273085]<hipe>i will have different tracs under the same apache, and for some new tracs i want to try bleeding edge nightly build of git and svn checkouts
[16:27:48.958397]<coderanger>hipe: Unfortunately that gets a little hairy because of how broken the svn bindings are
[16:28:05.061781]<coderanger>hipe: As far as mod_wsgi/Python goes, it is fine and I do it frequently
[16:28:19.252722]<hipe>yeah i'm using git but i'll probably just avoid that whole mess. bleeding edge everything seems to be working so far for me.
[16:28:30.379667]<hipe>thx coderanger
[16:28:52.887986]<coderanger>hipe: As long as you don't use the svn bindings it would be fine and there is a recipe on the mod_wsgi wiki
[16:29:05.011639]<hipe>right on
[16:29:59.144594]<coderanger>Just make sure you use a different app group for each setup
[16:30:26.241659]<coderanger>If you end up needing the svn bindings, you can still do it with FCGI
[16:33:34.559020]<hipe>coderanger: do you have any feelings about using tracd instead of apache for production? with multiple tracs (and virtualenvs) on a server?
[16:33:45.584334]<coderanger>Don't
[16:34:37.429597]<coderanger>Using a cluster of tracds behind a proxy will work in theory, but there is no real reason to do so
[16:34:50.949213]<coderanger>Not when gunicorn is better in every useful respect
[16:35:51.754248]<coderanger>gunicorn vs. mod_wsgi is definitely an open question and I've heard no absolute truth either way, each is good at different things
[18:52:55.906920]<gusg>I don't understand how Trac integrates with SVN. Do the SVN server and tracd processes have to run on the same machine?
[20:17:12.067630]<atk5025>hi, does anyone have experience setting up the Account Manager Plugin?
[20:17:51.793741]<cilkay>atk5025: yes, it "just worked" for me.
[20:18:23.873391]<cilkay>I'm running 0.11.1
[20:19:03.991982]<atk5025>I am trying to set it up to allow authentication to a LDAP server and am finding documentation difficult to find
[20:19:17.913970]<atk5025>I have trac v. 0.11.6
[20:19:31.545704]<cilkay>I don't auth against LDAP.
[20:27:49.454505]<coderanger_>atk5025: Whats the issue
[20:28:07.691448]<coderanger_>You have the LDAP auth plugin installed, right?
[20:35:21.962274]<atk5025>yes I do have it installed, I think
[20:49:38.115413]<atk5025>looks like I have some issues to work out with the LDAP auth plugin install
[20:50:37.529269]<atk5025>https://trac-hacks.org/ticket/6183
[20:50:46.603664]<atk5025>I think I have to work through this
[20:57:13.908850]<coderanger_>atk5025: LdapPlugin is very different
[20:57:23.245632]<coderanger_>atk5025: That is for doing permissions against LDAP, not authentication
[20:58:21.098103]<coderanger_>atk5025: http://pypi.python.org/pypi/TracLDAPAuth is the plugin you need for authn
[21:02:45.685125]<atk5025>mhmmmm... I'm running Python v 2.6, would running the 2.5 version still work?
[21:03:03.856957]<coderanger_>atk5025: Hmm?
[21:03:16.097071]<coderanger_>The egg? No, you need to use the source dist
[21:13:44.769410]<evil_twin>t.e.o: Ticket #4519 ([PATCH] Feature: component owner ticket notification) updated - <http://trac.edgewall.org/ticket/4519#comment:10> - anonymous
[21:16:43.775785]<atk5025>ok so I copied the resulting egg file to my plugins folder
[21:17:43.021000]<coderanger_>atk5025: and you made the config changes shown?
[21:23:54.191718]<atk5025>when I made the changes I got a long list of errors...
[21:24:37.079496]<atk5025>stemming from:
[21:24:38.237946]<atk5025>Exception RuntimeError: 'maximum recursion depth exceeded in __subclasscheck__' in <type 'exceptions.RuntimeError'> ignored Failed to open environment. maximum recursion depth exceeded while calling a Python object
[21:57:12.442217]<atk5025>is there anyway to test if its working?
[22:07:37.386044]<atk5025>coderanger_ I think it got set up properly but I wanted to have it populate the email address field for the session, it doesn't seem like that happened here
[22:09:09.322731]<coderanger_>atk5025: It doesn't do that
[22:09:26.960688]<atk5025>ahhh...
[22:11:05.656219]<atk5025>do you have a recommendation for a tool to do that?
[22:11:24.969543]<atk5025>I'm looking through the list again off the trac-hacks site
[22:29:23.319766]<coderanger_>atk5025: I know of none
[22:44:01.837695]<atk5025>is this not something that people generally want done? you know, single sign on kinda ability?