Team Chat Logs

April 16, 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:40:02.765615]<kirean>hi, can I do this better in python?
[00:40:03.006641]<kirean>for x in alist:
[00:40:03.020421]<kirean> if x.testStuff():
[00:40:03.032965]<kirean> # dostuff
[00:56:44.410746]<scfe>kirean: you can do it shorter if you like but it will be harder to understand
[00:57:06.640165]<scfe>for example map(dostuff, filter(lambda item: item.testStuff(), alist))
[01:26:41.706450]<kirean>scfe: thanks
[01:29:44.396605]<osimons>kirean: also, if you are collecting the results from the loop a common way is to use list comprehension; items = [dostuff(x) for x in alist if x.testStuff()]
[01:31:11.196572]<kirean>osimons: excellent.. thanks
[02:34:58.150195]<rblank>Anyone knows how to extract the message catalog in Trac? The suggested "python setup.py extract_messages" bombs with "genshi.template.loader.TemplateNotFound: Template "layout.html" not found" :(
[02:38:06.281587]<lelit>strange
[02:38:48.562062]<lelit>I add "-l it" to that, but it works
[02:40:27.504617]<lelit>btw, what's the procedure to get checkin permission on the trac svn? cboos suggested me to directly commit my it-catalog fixes
[02:41:14.899777]<lelit>rblank: there's even some recipes in the Makefile related to the catalog handling
[02:43:05.349119]<rblank>lelit: Thanks for the suggestions. "make extract" gives the same result. The "-l it" cannot be used with extract_messages.
[02:43:36.072385]<rblank>lelit: About commit permission, email cboos and he'll set you up.
[02:43:41.952387]<lelit>oh, right, that's for update_catalog
[02:43:48.261863]<lelit>ok
[04:16:23.737151]<bionoid>rblank: You have Babel installed, right?
[04:17:22.831182]<rblank>bionoid: Yes, translations show correctly in the browser.
[04:19:09.861954]<bionoid>rblank: Hmm could be you're using two different python versions?
[04:19:33.802159]<bionoid>rblank: Ie web server runs with 2.6, CLI on 2.5? In that case template will be in the wrong site-packages dir
[04:19:55.304361]<rblank>bionoid: I'm actually running tracd from a virtualenv for development.
[04:20:15.220479]<rblank>Everything is run from 2.6.
[04:58:51.768065]<bionoid>rblank: Hmmm ok, and if you try to locate/find that file within virtualenv, it exists?
[04:59:25.335154]<rblank>bionoid: layout.html is part of Trac, it's included by all templates. Yes, it's there :)
[04:59:41.470121]<rblank>Somehow, Babel doesn't seem to find it.
[04:59:59.788264]<rblank>It's in trac/templates
[05:02:18.397672]<bionoid>rblank: Strange stuff.. And nothing else in debug logs? like the exact path it attempts to open? :\
[05:02:42.187837]<rblank>Debug logs... Must find how to enable that.
[05:06:00.673411]<bionoid>[logging] log_level = DEBUG in trac.ini
[05:07:45.853842]<rblank>bionoid: Well, extracting the messages doesn't run Trac at all, so there's no logging involved...
[05:09:12.110343]<bionoid>rblank: strace it then?
[05:09:24.498388]<rblank>bionoid: Oh, good suggestion!
[05:09:37.087358]<rblank>I was thinking too "high level" :)
[05:09:55.644336]<bionoid>Worth a shot anyway.. should tell you what it tries to open ;-)
[05:41:40.161193]<cmlenz>oh damn
[05:42:23.680425]<cmlenz>rblank: that's probably caused by http://genshi.edgewall.org/changeset/1099
[05:43:05.104116]<rblank>cmlenz: Seems likely, yes. Thanks for joining the fun! :)
[05:43:24.350125]<rblank>Let me check...
[05:44:05.118883]<rblank>cmlenz: Yep, reverting to 1098 works.
[05:46:42.480560]<rblank>Cool, now I can actually verify that my i18n fixes actually work :)
[05:48:11.936069]<cmlenz>rblank: svn up genshi
[05:49:15.131662]<rblank>cmlenz: Works great. Thanks!
[05:52:00.174093]<cmlenz>np
[05:52:12.598335]<cmlenz>good thing you tried this before the release :P
[05:53:31.422611]<rblank>:)
[06:18:26.832501]<_dave_h_d>hey guys when i use ___group___ can i limit the number of grupations i have in my report?
[06:27:03.947722]<kirean>_dave_h_d: not dynamic I know, but you could specify AND milestone in ('a','b','c')
[06:27:16.026992]<kirean>at least that would get you forward
[06:27:59.320139]<_dave_h_d>kirean: you mean you can't do it dynamically?
[06:28:22.748578]<_dave_h_d>using sql?
[06:40:07.406486]*retracile mumbles something grouchy about mornings.
[06:52:14.284504]<kirean>_dave_h_d: I can't ;-)
[07:14:59.760245]<rhpot1991>what is the best way to group wiki pages, use a folder type location?
[08:04:51.031388]<herlock>Hello
[08:05:08.023011]<cmc>hiya
[08:05:36.911358]<herlock>Could somebody may explain me why I can read/write in a svn repository on command line, but I can't see any source with Trac's source browser ?
[08:06:10.469917]<cmc>possibly! which version of Trac are you running?
[08:06:25.417258]<herlock>here is my svn access file : http://pastebin.com/vEACM8aQ but I don't want that every one has a read access on every repos
[08:06:44.280876]<herlock>cmc : 0.11.7
[08:07:23.314194]<cmc>and does the svn repo exist on the same server as trac
[08:07:39.903734]<herlock>of course :-)
[08:07:50.939535]<herlock>installed on /trac and /svn
[08:08:02.637537]<cmc>good! now, did the svn repo have changesets in it before you configured trac?
[08:08:19.775713]<herlock>like what ?
[08:08:48.204005]<cmc>did you set up the repo at the same time as trac or were you connecting trac to an existing repo
[08:09:32.692034]<herlock>cmc I did it at the same time
[08:09:42.333579]<herlock>here is my virtual hosts http://pastebin.com/Cc8zZr4A
[08:10:01.306868]<cmc>the trac ini is the important part
[08:11:26.280982]<herlock>the same is trac.ini.sample
[08:12:36.320678]<cmc>alrightah, you'll need to edit that
[08:12:54.652442]<herlock>http://pastebin.com/spam.php?i=H9ikizu5
[08:13:01.628642]<cmc>http://trac.edgewall.org/wiki/TracIni#trac-section : look at repository_type and repository_dir
[08:13:17.529799]<_dave_h_d>guys, can you limit __group__ in trac report
[08:13:30.027882]<_dave_h_d>so i want to have max 3 groupations
[08:13:46.810391]<cmc>herlock: set repository_dir to the svn repo (I think /svn in your setup)
[08:13:53.250645]<cmc>herlock: then restart apache
[08:14:00.279462]<cmc>_dave_h_d: Use a sub select
[08:14:47.587182]<herlock>cmc, it doesn't work
[08:15:05.310678]<herlock>cmc: but the @administrator group can see the source in trac
[08:15:13.828322]<_dave_h_d>cmc here is sql http://pastebin.com/fT4pFzb1
[08:15:20.570894]<_dave_h_d>i want 3 versions only.
[08:15:23.812680]<herlock>and if I add * = r in [/] of my accessFile, it works for everyone
[08:15:46.378239]<herlock>but consequently, everyone has a read access on the repos, and I don't want that
[08:15:48.293908]<_dave_h_d>cmc: is this possible?
[08:17:46.897938]<cmc>herlock: I didn't realized that it the svn auth was respected, but that's kind of cool
[08:18:12.067419]<herlock>cool, uh ? :)
[08:18:35.189858]<cmc>herlock: try adding a different authz file, look at the authz_file config
[08:20:11.610027]<herlock>si I'll need to modify two authz_file when I add a project ? :(
[08:20:37.078877]<cmc>_dave_h_d: I don't understand the sql. you're grouping by something that you aren't sorting by
[08:21:23.611129]<cmc>herlock: the idea is that it would be consistent, so *Generally* you would only want the people with svn read access to view the repo
[08:21:36.989233]<cmc>you're asking for an abnormal case, hence you need an abnormal solution
[08:22:44.664495]<herlock>is it abnormal that I want that my all my repos aren't readable except for a group of users ?
[08:23:04.501549]<herlock>or I didn't understood /o\ (which is possible..)
[08:24:20.251249]<cmc>so you're saying that right now, the administrator group can view the source in trac, no?
[08:24:46.231208]<herlock>exact
[08:24:55.186167]<cmc>but anonymous cannot
[08:25:20.579828]<cmc>is that now what is here: http://pastebin.com/vEACM8aQ ?
[08:26:20.450129]<herlock>but theoretically, @logique group should be able to read source from trac in the "logique" project isn't ?
[08:26:53.235803]<herlock>users in @logique can do svn co http://foobar/svn/logique
[08:27:00.692102]<herlock>and commit too
[08:27:10.479416]<cmc>oh I see what you are trying to do
[08:27:21.535987]<cmc>but unfortunately, trac is not that fine grained
[08:27:27.821877]<herlock>oh :o
[08:27:41.646281]<herlock>so the only solution is to have two files ?
[08:27:47.837310]<cmc>you can set up additional projects where you limit the source control futher
[08:28:11.429357]<cmc>herlock: I don't think two files will help you, as they will be able to see all of the repository through trac
[08:28:46.014121]<herlock>so there's no solution ?
[08:28:55.770540]<_dave_h_d>come one guys http://pastebin.com/fT4pFzb1 :-)
[08:29:01.199084]<_dave_h_d>its a good challenge
[08:29:43.630125]<cmc>herlock: the only that I can think of is to have a separate trac instance for each sub group
[08:30:00.720112]<cmc>herlock: but take a look on trac hacks, maybe someone's made a more fine permission plugin: http://trac-hacks.org/
[08:30:59.817516]<cmc>herlock: http://trac.edgewall.org/wiki/TracFineGrainedPermissions
[08:31:06.270430]<cmc>looks like it might exists in 0.12
[08:32:18.960759]<cmc>_dave_h_d: as I said, your query doesn't make much sense. you are ordering by time rather than your grouping query
[08:33:14.658660]<cmc>this means that if ticket 1 has __GROUP__ 'a' , 2 has __GROUP__ 'b', and 3 has __GROUP__ 'a', you'll be getting three groupings, which doesn't make sense here
[08:34:37.415260]<cmc>if you want to ignore that problem, then you can add an additional where clause like: and __group__ IN (someoption1, someoption2, someoption3)
[08:35:18.311879]<cmc>or __group__ IN (Select somesfield FROM sometable WHERE something LIMIT howevermany)
[08:39:20.463898]<herlock>cmc, thanks for your help :)
[08:39:33.185763]<cmc>herlock: sorry it wasn't too helpful ;)
[09:03:23.043896]<_dave_h_d>cmc
[09:03:34.564743]<_dave_h_d>i am by the version closest to now
[09:04:41.362810]<cmc>oh duh, I was reading t.time not v.time
[09:04:57.638999]<cmc>then that's simple enough, one moment
[09:05:37.665467]<cmc>and v.name IN (SELECT name FROM version ORDER BY v.time DESC LIMIT 3)
[09:05:43.686268]<cmc>add that to the where clause
[09:06:15.014576]<cmc>that'll limit it to three versions
[10:56:11.776251]<foomor>Hey! How can i rename an existent trac project enviroment? Will it be enough to rename only a project directory?
[10:57:26.538960]<cmc>what do you mean by "rename"?
[10:59:13.783519]<foomor>cmc, well, i have project1 for example, i want to rename it to project2, so it will be still in the list of available projects, and everything will work properly
[11:00:38.041118]<cmc>I think you're thinking of name in the [project] section of your trac.ini
[11:00:46.783046]<cmc>I don't think the folder names are used for anything
[11:01:25.027445]<cmc>http://trac.edgewall.org/wiki/TracIni#project-section for reference
[11:01:38.445519]<foomor>they are used actually for a link
[11:01:52.531407]<foomor>just renamed a directory and everything works fine :)
[11:02:10.501398]<foomor>yep, i need to correct project name in trac.ini although
[11:02:58.606095]<foomor>cmc, http://trac.foomor.com/ see there're 2 same projects
[11:03:17.183122]<foomor>the only differ is in the link suffix caused by directory name
[11:03:53.479985]<cmc>ah, I see, in the url
[11:08:14.475454]<eyzn>is it possible to use wikimakros in templates/site.html?
[11:08:57.231628]<eyzn>wikimakros like [[RecentChanges(,10)]]
[11:09:44.762689]<osimons>eyzn: sure, do something like... ${wiki_to_html(context, '[[RecentChanges(1,0)]]')}
[11:10:07.108260]<osimons>(untested, but the function to render wiki markup is available)
[11:12:36.479880]<eyzn>hmm doesnt work so far
[11:14:43.992458]<eyzn>ill try this render_macro() http://trac.edgewall.org/wiki/TracDev/ApiChanges/0.11#IWikiMacroProvider
[11:22:59.463505]<thijstriemstra>sweet http://simelo-en.blogspot.com/2010/04/on-adding-amf-support-trac.html
[11:23:51.213800]<thijstriemstra>seems something like http://pypi.python.org/pypi/TracRpcProtocols could/should be part of trac perhaps..
[11:29:50.201120]<cmc>osimons is famous!
[11:32:40.045915]<cmc>though, thumbs down to AMF
[11:32:49.673853]<hasienda>evening everyone.
[11:32:58.127435]<cmc>hi
[11:33:49.969129]<hasienda>Using to_utimestamp and from_utimestamp here for upcoming custom time field support.
[11:34:15.166544]<hasienda>Here is a bad side-effekt:
[11:35:20.101470]<hasienda>They replace empty input with current date/time.
[11:35:47.581099]<cmc>write a wrapper?
[11:36:16.795778]<hasienda>This might be good, well even desired for time and changetime, not for custom time fields.
[11:36:40.798211]<hasienda>Wrapper, just _one_ option.
[11:36:44.270304]<cmc>if field then to_utimestamp else field
[11:37:09.946176]<cmc>sorry to_utimestamp(field)
[11:38:02.439495]<hasienda>How about something like to_timestamp(t, fillempty=False)?
[11:38:49.464535]<hasienda>as extended default, compatible with current behavior.
[11:39:25.085391]<cmc>makes sense as long as it doesn't clash with something already in existence
[11:40:16.273589]<hasienda>I can't see such a collision. And no need for if-statements everywhere I'll use it with custom fields.
[11:40:43.488504]<hasienda>just to_timestamp(t, fillempty=True)
[11:40:51.883725]<hasienda>there.
[11:42:22.704136]<hasienda>*** Thinking hard of something reading nicer, shorter and more logical straight forward than 'fillempty'.
[11:42:43.278901]<cmc>default_now
[11:43:19.914978]<hasienda>cmc: better indeed. :-)
[11:43:39.522017]<cmc>pretty sure I've seen it in python docs somewhere :)
[11:45:01.338611]<hasienda>cmc: certainly you're reading python docs longer than me. That's why I'm asking here.
[11:46:16.600715]<hasienda>So, I may safely stick to this, fixing some of the remaining bug my code.
[11:50:31.954931]<hasienda>It'll help since I continue to fail in finding the place(s) where the current date/time is leaking into empty values meant to be empty again and again.
[11:53:33.471370]<hasienda>*** Going to put from_utimestamp(t, default_now=False) and to_utimestamp(t, default_now=False) ​into the patch
[13:11:34.214142]<osimons>thijstriemstra: glad you like it :-) taken some time, but...
[13:32:01.723485]<osimons>thijstriemstra: my main interest was making it pluggable - like i indicated to you quite some time ago. Olemis has contributed, and also been keen on getting various protocols adapted. should all be good to go in not too long.
[14:11:08.739686]<gregcoit>I'm looking at a trac index that has some docs under a geadin and other's not - how does TitleIndex(format=group,min=4) decide?
[14:37:13.589612]<gregcoit>I'm looking at a trac index that has some docs under an "Aegir" heading and others (that also start with Aegir) are not - how does TitleIndex(format=group,min=4) decide?
[14:49:20.012875]<fero>hello, I have problem in installing trunk version. I really like
[14:49:44.244819]<fero>I'd really like to try it. Problems are: I have not compile_catalog options in setup.py
[14:51:06.565437]<fero>but even more ... I don't succeed in install Genshi dependency . There's not 0.6dev-r1072 on genshi dev site :( ... I tried also to easy_install Genshi==dev but no luck. easy install fails with "error: Unexpected HTML page found at http://svn.edgewall
[14:51:06.766830]<fero>"
[16:31:51.737739]<hasienda>fero: works for me: Trac 012dev, Genshi 0.6dev-r1092 AND you may (will?) need Babel (here: 1.0dev-r482) to get compile_catalog working.
[16:32:21.631735]<fero>uh ? I have just opened a ticket ... let me try again...
[16:33:57.649250]<fero>hasienda: the problem is that I have no compile_catalog command
[16:34:23.274234]<fero>and look at this: error: Could not find suitable distribution for Requirement.parse('Genshi>=0.6dev-r1072')
[16:34:42.134616]<fero>if you like a more detailed report
[16:35:10.685798]<fero>http://trac.edgewall.org/ticket/9240
[16:35:40.550621]<hasienda>fero: tried to install without easy_install yet?
[16:36:09.401337]<fero>hasienda: I tried with plain ./setup.py and with easy_install
[16:39:55.948074]<hasienda>fero: Using Debian lenny here, I checked out trunk versions of all packages mentioned before, all into subdirs of one dir for building.
[16:42:53.253875]<hasienda>fero: installed Babel, than Genshi, than Trac: http://dpaste.com/184709/
[16:44:13.990069]<fero>can you point me to a website where there is genshi r1072 ?
[16:45:02.203840]<fero>I took a look at genshi.edgewall.org and browse source, and I see that 1071 is latest release
[16:45:20.978433]<fero>when have you installed 0.12dev. now ?
[16:46:33.670255]<hasienda>fero: installing 10 times a day since some days while working on patched for Trac trunk. np so far.
[16:47:33.648196]<fero>sorry ... I am not sure to understand... even today ?
[16:48:13.564743]<hasienda>fero: BTW: compile_catalog will be available only, if import babel works in is in trunk/setup.py. It certainly does skip silently for you now.
[16:49:29.349387]<fero>ah ok . I installed babel , but not python-babel :)
[16:49:33.876712]<fero>I'm trying now
[16:49:55.382317]<hasienda>fero: I use trac-0.12dev-r9443 for my current development, but that shouldn't matter too much.
[16:51:46.823070]<hasienda>fero: Well, forget about Deb packages for Trac trunk. That will/can't work with stable relase. Else it would be named Debian bleading edge. ;-)
[16:54:15.567781]<fero>hasienda: I succeed in compile_catalog ! which version of babel works ?
[16:56:38.188379]<hasienda>fero: 1.0dev-r482 works for me right now. See pre-annoucements of an upcoming 1.0 release here on #trac some days before. I didn't look at it since then.
[16:59:13.106533]<fero>easy_install babel tries to install 0.9.4
[16:59:21.028856]<fero>debian package is 0.9.4
[16:59:29.695366]<fero>won't it work ?!?
[17:05:35.419870]<fero>sorry I have to go bed now ... I too much tired
[17:22:21.321659]<hasienda>fero: me too, maybe see you tomorrow? bye.
[17:26:06.147319]<hasienda>fero gone, but just for the record: required is >=0.9.5 according to http://trac.edgewall.org/wiki/0.12/TracInstall
[17:26:23.245602]<hasienda>good night everyone.