| [00:23:05] |
* |
peppelorum has quit IRC |
| [00:24:48] |
<sam`> |
#3177 and #3178 |
| [00:30:23] |
* |
cboos has joined #trac |
| [00:51:41] |
* |
cprov has joined #trac |
| [01:03:13] |
* |
otaku42_away is now known as otaku42 |
| [01:03:23] |
* |
contingencyplan has joined #trac |
| [01:58:46] |
* |
_oiu has joined #trac |
| [01:59:04] |
<_oiu> |
is it common for create new ticket to take ~10-15 seconds to commit ? |
| [02:01:26] |
* |
roo9 has joined #trac |
| [02:01:49] |
<roo9> |
hello, anyone have an idea why I would get an "Address already in use" error when starting tracd |
| [02:05:02] |
* |
eblot has joined #trac |
| [02:17:10] |
* |
eblot has quit IRC |
| [02:20:06] |
<roo9> |
it seems thats the error you get when your trac dir does not exist |
| [02:20:14] |
<roo9> |
yay for helpful error messages! |
| [02:34:26] |
* |
tuxipuxi has joined #trac |
| [02:38:12] |
* |
Logi has left #trac |
| [02:46:14] |
<roo9> |
and --auth does not work |
| [02:46:14] |
<roo9> |
raise util.TracError('Authentication not enabled. ' |
| [02:57:50] |
* |
_oiu has quit IRC |
| [03:14:18] |
<roo9> |
damn, ok, error messagess |
| [03:14:21] |
<roo9> |
they are these things |
| [03:14:28] |
<roo9> |
that tell users what went wrong |
| [03:14:46] |
<roo9> |
and either tell them how to fix it, or at least give them an idea of where to start looking |
| [03:22:36] |
* |
Blackhex has joined #trac |
| [04:16:37] |
* |
cprov is now known as cprov-lunch |
| [04:28:43] |
* |
imajes has joined #trac |
| [04:57:46] |
* |
_idostyle has joined #trac |
| [05:05:33] |
<cboos> |
hi all, if someone has a few cycles to waste, I would be very much interested in getting some feedback on the ticket comment threading stuff from #2703 ... |
| [05:13:55] |
* |
idostyle has quit IRC |
| [05:14:05] |
* |
_idostyle is now known as idostyle |
| [05:29:19] |
* |
xin has joined #trac |
| [05:35:15] |
* |
xin has left #trac |
| [05:47:57] |
* |
halorgium has quit IRC |
| [05:47:59] |
* |
halorgium has joined #trac |
| [05:48:51] |
* |
xin has joined #trac |
| [05:59:59] |
<halorgium> |
xin: wow, ltns |
| [06:00:19] |
<xin> |
:O |
| [06:00:22] |
<xin> |
ltns ? |
| [06:00:28] |
<halorgium> |
long time to see |
| [06:00:30] |
<halorgium> |
:P |
| [06:00:32] |
<xin> |
oh yeah |
| [06:00:57] |
<halorgium> |
i thought i'd try and use some web-talk |
| [06:01:07] |
<xin> |
:/ |
| [06:01:46] |
<xin> |
is there any way to make trac auth with the subversion reposotory? |
| [06:01:58] |
<halorgium> |
using the same auth backend? |
| [06:02:23] |
<halorgium> |
how is the svn auth setup? |
| [06:02:33] |
<halorgium> |
AuthUserFile /home/svn/.dav_svn.passwd |
| [06:02:38] |
<halorgium> |
something like that? |
| [06:02:47] |
<halorgium> |
with AuthzSVNAccessFile .... ? |
| [06:03:10] |
<xin> |
At the moment its not. I'm trying to setup dynamic hosting atm |
| [06:03:31] |
<xin> |
and I don't want joe being able to log onto bobs project |
| [06:04:00] |
<halorgium> |
xin: check out AuthzSVNAccessFile |
| [06:04:05] |
<halorgium> |
it is pretty cool |
| [06:04:17] |
<halorgium> |
how is trac running? |
| [06:04:26] |
<halorgium> |
tracd/apache/lighttpd ? |
| [06:04:38] |
<xin> |
yeah, but the svn book only mentioned one authz file. despite the fact <sub>/config/authz exists |
| [06:04:41] |
<xin> |
its running under apache |
| [06:04:43] |
<xin> |
everything is |
| [06:05:08] |
<halorgium> |
right, well the trac can be setup to use the same AuthUserFile as svn |
| [06:05:23] |
<halorgium> |
but the permissions won't work right |
| [06:05:28] |
<xin> |
mmhumm |
| [06:05:35] |
<halorgium> |
i would move towards a mysql/pgsql auth backend |
| [06:05:44] |
<halorgium> |
mod_auth_mysql isn't too bad |
| [06:06:42] |
<xin> |
humm. yet another level of authentication. Damnit people, why can't things auth with the things their serving/accessing?! |
| [06:07:08] |
<halorgium> |
xin: because svn doesn't actually do _any_ auth |
| [06:07:33] |
<halorgium> |
and the trac is accessing it over file://.../../ |
| [06:07:46] |
<xin> |
yeah |
| [06:08:04] |
<xin> |
kinda retarded imo, but hey |
| [06:08:09] |
<halorgium> |
heh |
| [06:09:07] |
* |
idostyle has quit IRC |
| [06:10:23] |
<xin> |
The way I would like it is /projects/X points to the project, /svn/X points to the svn path, and /dev/X points to the site I'm developing. And them all being authenticated. |
| [06:10:45] |
<xin> |
I guess you're right, mod_auth_mysql would be best |
| [06:13:07] |
* |
idostyle has joined #trac |
| [06:23:37] |
* |
mgalvin has joined #trac |
| [06:34:42] |
<xin> |
halorgium: mod_auth_mysql still doesn't allow per-folder auth. Unless I'm doing something wrong |
| [06:34:52] |
<halorgium> |
it does |
| [06:35:08] |
* |
agile has quit IRC |
| [06:35:08] |
<xin> |
orly? |
| [06:35:23] |
<halorgium> |
yarly |
| [06:35:26] |
<halorgium> |
just put the auth connect stuff in the vhost and the more specific stuff in <Directory ..> |
| [06:35:59] |
<halorgium> |
lemme find my setup |
| [06:36:11] |
* |
agile has joined #trac |
| [06:36:30] |
<xin> |
chur bro |
| [06:37:01] |
<halorgium> |
Auth_MySQL_Info localhost user pass <-- in vhost |
| [06:37:30] |
<halorgium> |
http://rafb.net/paste/results/9ZUDPs46.html |
| [06:38:25] |
<athomas> |
my last and only other camera was a digital ixus :) |
| [06:38:30] |
<athomas> |
whoops, wrong channel |
| [06:39:42] |
* |
agile has quit IRC |
| [06:40:29] |
* |
agile has joined #trac |
| [06:42:25] |
* |
agile has quit IRC |
| [06:43:00] |
* |
mfuchs has joined #trac |
| [06:46:46] |
<xin> |
halorgium: yeah, but is it possible to do it dynamically and not need a new <Directory> path? |
| [06:47:53] |
<halorgium> |
xin: oh, dunno |
| [06:48:25] |
<xin> |
Ill just do something like <project>.<site>.com/svn then |
| [06:52:07] |
* |
mgalvin has quit IRC |
| [06:52:56] |
* |
mgalvin has joined #trac |
| [06:57:25] |
* |
danbeck has joined #trac |
| [07:01:33] |
* |
matt_good_ has joined #trac |
| [07:03:29] |
* |
matt_good has quit IRC |
| [07:10:33] |
* |
klasstek has joined #trac |
| [07:22:50] |
* |
MasterC has joined #trac |
| [07:23:37] |
* |
wbb4 has joined #trac |
| [07:29:02] |
* |
agile has joined #trac |
| [07:31:43] |
* |
imajes_ has joined #trac |
| [07:41:47] |
* |
cprov has joined #trac |
| [07:49:25] |
* |
imajes has quit IRC |
| [07:57:36] |
* |
cprov-lunch has quit IRC |
| [08:23:11] |
* |
boorad has quit IRC |
| [08:30:06] |
* |
galis has joined #trac |
| [08:31:24] |
* |
matt_good_ has quit IRC |
| [08:34:16] |
* |
MasterC has quit IRC |
| [08:38:42] |
* |
coderanger_ has quit IRC |
| [08:58:12] |
* |
ryepup has quit IRC |
| [09:06:25] |
<cboos> |
mat|work: Hi matt, if you have 2 minutes... is there any reason why the bold and italic syntax can't be negated? (using !'' or !''')? I'd like to make that consistent with the rest and quick testing shows that it would work... |
| [09:20:28] |
* |
imajes_ is now known as imajes |
| [09:21:24] |
<mat|work> |
mat != matt :) |
| [09:21:36] |
<cboos> |
oops ! |
| [09:21:53] |
<cboos> |
I thought mgood == mat|home :) |
| [09:24:41] |
<asmodai> |
heheh |
| [09:24:44] |
<asmodai> |
cboosje! |
| [09:25:01] |
<cboos> |
je? |
| [09:25:05] |
<pacopablo> |
cboos: which patches need to be applied from #2703? |
| [09:25:18] |
<cboos> |
ah! the last one... wait |
| [09:25:23] |
<asmodai> |
cboos: Dutch ending to make it sound smaller or cuter. :) |
| [09:25:44] |
<cboos> |
pacopablo: http://projects.edgewall.com/trac/attachment/ticket/2703/comment_threading-r3323.patch |
| [09:26:04] |
<cboos> |
asmodai: ach, the dutchjes ... ;) |
| [09:26:13] |
* |
otaku42 is now known as otaku42_away |
| [09:26:56] |
* |
pacopablo wonders if there is patch for windows |
| [09:27:06] |
* |
pacopablo hates not working in linux |
| [09:27:24] |
<cboos> |
hm, well there's the cygwin /mingw stuff (I use cygwin) |
| [09:27:42] |
<pacopablo> |
ugh, i abhore cygwin |
| [09:28:25] |
<cboos> |
well, is it possible to get some work done without bash? |
| [09:28:41] |
<asmodai> |
HAhaha |
| [09:29:01] |
<pacopablo> |
not really |
| [09:29:34] |
<cboos> |
so ... in a cygwin bash on windows, you can do the usual patch -p0 < comment_threading... in the trunk (a recent one) |
| [09:29:43] |
<pacopablo> |
screw it, I'll just do it on my server |
| [09:30:00] |
<cboos> |
... but maybe TortoiseSVN can do that as well... |
| [09:31:26] |
<cboos> |
ah, well, only for patches produced by SVN, apparently. |
| [09:32:04] |
<pacopablo> |
darn |
| [09:32:15] |
<cboos> |
I forgot to say, the above patch should be applied using -p1 |
| [09:32:25] |
<pacopablo> |
how do windows developers actually get anything done? |
| [09:32:47] |
<cboos> |
that is: "patch -p1 < comment_threading... " |
| [09:32:58] |
<pacopablo> |
no shell, crappy editors, ... |
| [09:36:50] |
<pacopablo> |
is there a wget-able version of the patch that you sent to teh dev list this morning? |
| [09:37:29] |
<pacopablo> |
"Additional definiton lists syntac proposal" |
| [09:39:01] |
<cboos> |
hm, no, but I can attach it somewhere... wait |
| [09:39:22] |
<pacopablo> |
it's alright, I can download and scp it |
| [09:39:41] |
<cboos> |
ok |
| [09:53:01] |
* |
chandlerc has quit IRC |
| [09:57:09] |
* |
chandlerc has joined #trac |
| [10:04:28] |
* |
ged has joined #trac |
| [10:10:09] |
* |
chandlerc has quit IRC |
| [10:16:40] |
* |
Blackhex has quit IRC |
| [10:27:51] |
* |
_idostyle has joined #trac |
| [10:44:47] |
* |
idostyle has quit IRC |
| [10:44:55] |
* |
_idostyle is now known as idostyle |
| [10:46:03] |
* |
cboos has quit IRC |
| [10:48:10] |
* |
coderanger_ has joined #trac |
| [10:48:26] |
* |
Blackhex has joined #trac |
| [10:57:57] |
* |
shawn has joined #trac |
| [11:01:06] |
* |
MasterC has joined #trac |
| [11:04:42] |
* |
langenberg has joined #trac |
| [11:05:01] |
* |
boorad has joined #trac |
| [11:05:41] |
<langenberg> |
Are there any disadvantages of using the trac standalone server in favor of running trac on a 'real' webserver? |
| [11:06:04] |
* |
shawn_ has quit IRC |
| [11:10:20] |
* |
whitelynx has quit IRC |
| [11:22:41] |
* |
MasterC has quit IRC |
| [11:24:36] |
* |
boorad has quit IRC |
| [11:26:47] |
<coderanger_> |
langenberg: Its slow |
| [11:26:58] |
<langenberg> |
ok, clear |
| [11:27:10] |
<coderanger_> |
Good enough for testing, and probably one or two users, but beyond that it gets annoying |
| [11:27:54] |
<langenberg> |
I actually need a really simple setup. For a school project we start a simple software project which runs for about a month. |
| [11:28:03] |
<langenberg> |
Currently thinking about using lighty. |
| [11:30:17] |
<coderanger_> |
Getting setup with either light* or apache isn't bad |
| [11:48:52] |
* |
s0undt3ch pings alect |
| [11:48:59] |
<pacopablo> |
probably asleep |
| [11:49:50] |
<pacopablo> |
it's 4:47am where he is |
| [11:50:00] |
<s0undt3ch> |
:( you don't use pound now do you? |
| [11:50:13] |
* |
cprov is now known as cprov-afk |
| [11:50:57] |
<coderanger_> |
pp: Any word from google |
| [11:56:41] |
* |
cprov-afk is now known as cprov |
| [11:57:18] |
* |
tag has quit IRC |
| [11:58:11] |
* |
tag__ has joined #trac |
| [11:59:05] |
<langenberg> |
Hmm, this error looks pretty strange 'TracError: The user root requires read _and_ write permission to the database file /var/lib/trac/igu_project/db/trac.db and the directory it is located in.' |
| [11:59:19] |
<langenberg> |
sure the 'root' user has write permission on that file. |
| [11:59:50] |
<langenberg> |
(my first attempt to run it with lighty btw) |
| [12:02:17] |
<coderanger_> |
is lighty actually running as root? |
| [12:02:44] |
<langenberg> |
Ah, no i'm glad it didn't. |
| [12:03:06] |
<langenberg> |
Permissions where rwx for root, and trac gave the error permission denied for root. |
| [12:03:35] |
<coderanger_> |
Well make sure you give rw to the user lighty is actually running as |
| [12:03:37] |
<langenberg> |
But it actually was running as lighttpd, so that's fixed. |
| [12:04:46] |
<langenberg> |
Where should lighty get a read (write) permission on? I'm noticing that the CSS file isn't send. |
| [12:05:13] |
<coderanger_> |
yes, that user is what needs rw access to the Trac env |
| [12:07:25] |
<langenberg> |
Look like it's working. |
| [12:07:27] |
<langenberg> |
:) |
| [12:20:41] |
* |
MasterC has joined #trac |
| [12:45:21] |
* |
cboos has joined #trac |
| [12:47:57] |
* |
MasterC has quit IRC |
| [12:49:47] |
* |
cprov has quit IRC |
| [12:49:57] |
* |
wbb4 has left #trac |
| [13:00:13] |
* |
dju` has joined #trac |
| [13:00:31] |
<pacopablo> |
coderanger_: not yet, you? |
| [13:00:59] |
<pacopablo> |
the suspense is killing me |
| [13:01:01] |
<coderanger_> |
Nope, looks like they are going to send the lists out tonight |
| [13:01:25] |
<pacopablo> |
I'm pretty sure I won't get accepted, but I atleast want to know that |
| [13:01:54] |
<pacopablo> |
s0undt3ch: I do happen to use pound, what's up? |
| [13:02:39] |
<coderanger_> |
pacopablo: Yeah |
| [13:03:14] |
<pacopablo> |
well, it's only 1pm PDT, so maybe by 5pm |
| [13:03:19] |
* |
jcw9 has joined #trac |
| [13:03:32] |
<pacopablo> |
cboos: I like the threading |
| [13:03:51] |
<pacopablo> |
though I think it would be even cooler if it did indentation and kept threads together |
| [13:04:01] |
<pacopablo> |
kind of like kerneltrap.org |
| [13:04:10] |
<pacopablo> |
but I'm sure that's probably a lot more work |
| [13:04:42] |
<cboos> |
well, the intent was to keep it non-intrusive but effective to use |
| [13:04:50] |
<pacopablo> |
right |
| [13:05:00] |
<pacopablo> |
and for that it works well |
| [13:05:14] |
<cboos> |
... and to put a good basis on which I could add "visual" threading later ;) |
| [13:05:30] |
<pacopablo> |
what would also be nice would be to be able to link directly to a given comment |
| [13:05:41] |
<pacopablo> |
kind of like section headings in the wiki |
| [13:05:42] |
* |
Blackhex has quit IRC |
| [13:05:56] |
<pacopablo> |
ticket:34#1 or something |
| [13:05:58] |
<cboos> |
that's the comment:xyz link resolver ... It's there. |
| [13:06:49] |
<cboos> |
you could even do things like comment:ticket:123:1.2 |
| [13:07:21] |
<pacopablo> |
cool,. so even though they don't have a link, you can still link to them? |
| [13:07:52] |
<cboos> |
...don't have a link... ? |
| [13:08:13] |
<cboos> |
the comments all have an id, I think |
| [13:08:44] |
<cboos> |
(except the attachments added change, because currently they are "volatile" changes) |
| [13:08:45] |
<pacopablo> |
can't right click->copy link location on a comment that doesn't have a reply |
| [13:08:56] |
<cboos> |
ah! let me check... |
| [13:09:16] |
<pacopablo> |
if it has a thread, then it has a link at the right ^1.1 etc |
| [13:09:19] |
<pacopablo> |
bbiab |
| [13:21:42] |
* |
coderanger_ has quit IRC |
| [13:29:49] |
* |
coderanger_ has joined #trac |
| [13:33:54] |
* |
chandlerc has joined #trac |
| [13:42:02] |
* |
coderanger_ has quit IRC |
| [13:51:11] |
* |
pacopablo is back |
| [13:59:07] |
* |
danbeck has quit IRC |
| [13:59:17] |
* |
Majestik_ has quit IRC |
| [14:01:27] |
* |
mgalvin has quit IRC |
| [14:02:07] |
<cboos> |
pacopablo: I've checked, all the comments have a link... |
| [14:02:20] |
<cboos> |
don't you see something like: |
| [14:02:21] |
<cboos> |
<date> <time> Modification <comment nb> by <author> |
| [14:02:22] |
<pacopablo> |
I must be blind |
| [14:02:26] |
<pacopablo> |
one sec |
| [14:02:31] |
<cboos> |
the <comment nb> is a link |
| [14:02:49] |
<pacopablo> |
ahh, got it now |
| [14:03:12] |
<cboos> |
Initially, that was a bit more visible (a paragraph mark, like the wiki headings) |
| [14:03:16] |
<pacopablo> |
I wonder if some little CSS trick would be nice to differentiate it a bit |
| [14:03:21] |
<pacopablo> |
yeah |
| [14:03:41] |
<pacopablo> |
or maybe just a different color |
| [14:03:53] |
<cboos> |
but this didn't play well with the "-- in reply to: - follow-ups: ..." part |
| [14:04:20] |
<pacopablo> |
what about a simple color change? |
| [14:04:55] |
<cboos> |
but I keep that in mind and I'll try to make it more apparent.. well maybe with a color |
| [14:06:54] |
<pacopablo> |
I do like it, though |
| [14:09:30] |
* |
jcw9 has quit IRC |
| [14:12:13] |
* |
lewislp has joined #trac |
| [14:13:52] |
<lewislp> |
custom fields question: how do i delete a custom field after it's been added? removing from trac.ini has no effect on the new/view ticket page... |
| [14:14:55] |
* |
robs0r has joined #trac |
| [14:15:15] |
<pacopablo> |
did you restart your webserver? |
| [14:15:23] |
<lewislp> |
nope |
| [14:15:29] |
<pacopablo> |
might want to do that |
| [14:15:51] |
<pacopablo> |
unless you're using CGI, in which case you'll probably want to switch to mod_python or fastcgi |
| [14:16:35] |
<lewislp> |
thanks...i assumed since a restart wasn't required to add them, a restart wouldn't be required to remove them |
| [14:16:40] |
<lewislp> |
that worked |
| [14:20:21] |
<pacopablo> |
mod_python and fastcgi end up havign weird caching issues |
| [14:20:40] |
<pacopablo> |
basically my rule of thumb is restart webserver after every config change |
| [14:21:58] |
* |
boorad has joined #trac |
| [14:23:06] |
<lewislp> |
good call...how about a subversion pre-commit hook that not only forces a ticket ID reference but also forces the commit user to be the trac assigned user? i've searched everywhere and can't find what should be a common request... |
| [14:23:51] |
<cboos> |
pacopablo: have to go... thanks for the feedback! |
| [14:24:04] |
<pacopablo> |
lewislp: not sure I'll be able to help you there |
| [14:24:12] |
<pacopablo> |
cboos: thanks for the great work :) |
| [14:24:38] |
<lewislp> |
ok, do you know the field in the ticket table for assigned user? |
| [14:24:46] |
<lewislp> |
i guess i can dig into the code... |
| [14:26:28] |
<pacopablo> |
I believe that it is the owner field |
| [14:26:33] |
* |
boorad has quit IRC |
| [14:27:58] |
<lewislp> |
looks right...now i need to extract the committer from the svn pre-commit script... |
| [14:29:51] |
* |
robs has quit IRC |
| [14:29:52] |
* |
robs0r is now known as robs |
| [14:32:53] |
* |
coderanger_ has joined #trac |
| [14:36:02] |
* |
mgalvin has joined #trac |
| [14:43:04] |
* |
cboos has quit IRC |
| [14:44:10] |
<lewislp> |
since a few people joined, anyone know how to get the svn username to compare against the ticket owner in an svn pre-commit hook? |
| [14:44:29] |
<coderanger_> |
hmmm, what is your goal? |
| [14:44:38] |
<pacopablo> |
have you taken a look at the post-commit hook in the contrib dir? |
| [14:44:57] |
<lewislp> |
preventing anyone but the owner of a ticket id from commiting against a ticket id |
| [14:46:16] |
<coderanger_> |
Doable, but you would have to write it up yourself |
| [14:46:28] |
* |
Schuyler has joined #trac |
| [14:46:31] |
<lewislp> |
AUTHOR=`/usr/bin/svnlook author -r $REV $REPOS` |
| [14:46:31] |
<Schuyler> |
hi folks |
| [14:46:36] |
<lewislp> |
is that what i'm looking for? |
| [14:46:43] |
<Schuyler> |
is Trac incompatible with Apache 2 mod_include? |
| [14:46:59] |
<Schuyler> |
it seems like loading mod_include breaks my ability to log into Trac |
| [14:47:13] |
<pacopablo> |
Schuyler: that would be an apache issue |
| [14:47:24] |
<pacopablo> |
trac shouldn't care that's it's being run by apache |
| [14:47:35] |
<coderanger_> |
lewislp: I think you need to use the -t flag |
| [14:47:47] |
<coderanger_> |
Since at the pre-commit phase, there is no revision yet |
| [14:47:50] |
<Schuyler> |
I think I found a relevant mailing list post |
| [14:47:54] |
<lewislp> |
i pulled that from the post-commit hook pacopable referenced |
| [14:48:04] |
<lewislp> |
pacopablo i mean |
| [14:48:19] |
<lewislp> |
oh, you're right |
| [14:48:26] |
<coderanger_> |
pre-commit gets two args, call tem $REPO and $TRANS |
| [14:48:37] |
<coderanger_> |
svnlook author -t $TRANS $REPO |
| [14:48:59] |
<lewislp> |
i'll try it |
| [14:50:19] |
<Schuyler> |
pacopablo: well fwiw if anyone asks again the answer is "ErrorDocument 401 default" in your Trac VirtualHost :-) |
| [14:50:22] |
<Schuyler> |
cheers ttfn |
| [14:50:34] |
* |
Schuyler has left #trac |
| [14:50:37] |
<pacopablo> |
Schuyler: see, apache error :) |
| [14:54:56] |
<lewislp> |
python question, trying to modify sql query to add "owner = author", where author is a local variable |
| [14:55:44] |
<pacopablo> |
cursor.execute('select * from ticket where owner = %s', author) |
| [14:56:29] |
<lewislp> |
hmm, so it's almost like the printf status to build strings anywhere... |
| [14:56:40] |
<lewislp> |
status wasn't the right word |
| [14:56:48] |
<pacopablo> |
not quite |
| [14:56:55] |
<coderanger_> |
lewislp: Use the API ... |
| [14:57:03] |
<pacopablo> |
there is only one replacement string %s |
| [14:57:09] |
<pacopablo> |
%d, %f, etc don't work |
| [14:57:14] |
<lewislp> |
oh, ok |
| [14:57:22] |
<pacopablo> |
but coderander is right, using the API would be better |
| [14:57:31] |
<coderanger_> |
also you need cursor.execute('select * from ticket where owner = %s', (author,)) |
| [14:57:52] |
<pacopablo> |
ahh, yes, it does need to be an iterable |
| [14:58:18] |
<pacopablo> |
that always trips me up since that's where it differs from the DBAPI 2.0 |
| [14:58:28] |
<pacopablo> |
one of the few places that is |
| [14:58:37] |
<coderanger_> |
Yeah |
| [14:58:52] |
<coderanger_> |
I should just make a patch one of these days |
| [14:58:53] |
<lewislp> |
coderanger_: when you say, use the API, what exactly are you referring to? |
| [14:59:19] |
<coderanger_> |
lewislp: You have a ticket id, and you want to see if the owner matches the author of the commit, right? |
| [14:59:35] |
<lewislp> |
coderanger_: yep |
| [14:59:41] |
<coderanger_> |
one sec |
| [14:59:50] |
<pacopablo> |
http://projects.edgewall.com/trac/browser/trunk/trac/ticket/model.py#L32 |
| [14:59:59] |
<coderanger_> |
yeah, that |
| [15:00:17] |
<coderanger_> |
Ticket(end, ticket_id).owner == author |
| [15:01:33] |
<coderanger_> |
Much easier, and less likely to need changes as time goes on |
| [15:01:49] |
<pacopablo> |
s/end/env |
| [15:01:59] |
<pacopablo> |
and that can be easily created by: |
| [15:02:04] |
<pacopablo> |
from trac.env import Environment |
| [15:02:15] |
<pacopablo> |
env = Environment('/path/to/trac/env') |
| [15:03:57] |
<lewislp> |
the pre-commit hook already has env = open_environment(env_path) |
| [15:04:13] |
<pacopablo> |
sounds good then |
| [15:04:40] |
<lewislp> |
i didn't catch how i go from that to Ticket(end, ticket_id).owner == author |
| [15:05:08] |
<lewislp> |
i apologize, but i've got zero python and zero trac code experience |
| [15:05:20] |
<pacopablo> |
from trac.ticket.model import Ticket |
| [15:05:41] |
<lewislp> |
ok |
| [15:05:42] |
<pacopablo> |
if Ticket(env, ticket_id).owner == author: |
| [15:05:44] |
<pacopablo> |
do stuff |
| [15:06:03] |
<lewislp> |
got it |
| [15:07:47] |
<lewislp> |
what's the secret to the end of a code block in python, a blank line? |
| [15:08:07] |
<coderanger_> |
lewislp: http://pastebin.com/733972 |
| [15:08:15] |
<coderanger_> |
Theres a basic version |
| [15:09:57] |
<lewislp> |
thanks guys, is this feature worth an enhancement submission to trac, or is my company the only one who wants to lock down commits to the ticket owner? |
| [15:10:22] |
<coderanger_> |
You can throw it on trac-hacks |
| [15:11:06] |
<coderanger_> |
I have been meaning to modularize the whole commit script system |
| [15:11:47] |
* |
dju` has quit IRC |
| [15:11:48] |
<lewislp> |
the code you posted looks a lot better than the trac-pre-commit-hook.py |
| [15:12:25] |
<lewislp> |
last question, can you use the API to iterate through the tickets rather than pulling from the DB with SQL? |
| [15:13:44] |
* |
whitelynx has joined #trac |
| [15:17:48] |
<pacopablo> |
well, you can always start at 1 and go until it raises a TracError |
| [15:18:09] |
<pacopablo> |
of course that will break if people use the ticket delete plugin |
| [15:18:29] |
* |
Riccc has joined #trac |
| [15:18:34] |
<pacopablo> |
are you talking about making sure that the ticket the reference in the commit is actually a ticket? |
| [15:18:46] |
<pacopablo> |
or do you really want a list of all tickets? |
| [15:19:15] |
* |
eblot has joined #trac |
| [15:21:43] |
<lewislp> |
the pre-commit code i have now uses an SQL query to return the tickets matching the ones referenced in the comment |
| [15:21:49] |
<lewislp> |
i was wondering if there's a better way |
| [15:22:07] |
<pacopablo> |
you could simply create a Ticket object for each one |
| [15:22:19] |
<pacopablo> |
if it raises a TracError, then it doesn't exist |
| [15:23:05] |
<coderanger_> |
I wonder if you could use some part of the query module to make this less dumb |
| [15:23:36] |
<lewislp> |
here's the code now: |
| [15:23:41] |
<pacopablo> |
pastebin! |
| [15:23:45] |
<lewislp> |
ok |
| [15:23:45] |
<pacopablo> |
@faq pastebin |
| [15:23:45] |
<evil_twin> |
pacopablo: "pastebin" is http://trac.pastebin.com |
| [15:25:06] |
<lewislp> |
http://trac.pastebin.com/734018 |
| [15:25:35] |
<lewislp> |
i found this somewhere on the web |
| [15:25:40] |
* |
mgalvin has quit IRC |
| [15:25:41] |
* |
klasstek has quit IRC |
| [15:26:23] |
* |
klasstek has joined #trac |
| [15:28:40] |
* |
Blackhex has joined #trac |
| [15:29:42] |
<pacopablo> |
http://trac.pastebin.com/734026 |
| [15:29:45] |
<pacopablo> |
not tested |
| [15:30:15] |
<pacopablo> |
and you'll have to take care of setting author and importing Ticket from trac.ticket.model |
| [15:30:24] |
<pacopablo> |
but that should get you close to what you want |
| [15:31:07] |
<pacopablo> |
and I forgot a closing apostraphe on the error message |
| [15:31:17] |
<pacopablo> |
so there is a bit of cleanup there, but perhaps it'll help |
| [15:35:18] |
* |
Riccc`Miam has quit IRC |
| [15:35:38] |
<coderanger_> |
pacopablo: Have you tried the new Gentoo installer? |
| [15:36:13] |
<pacopablo> |
coderanger_: not yet |
| [15:36:16] |
<pacopablo> |
is it nice? |
| [15:36:43] |
<coderanger_> |
No idea, debating if I should try it, or stick with the normal install that I'm used to |
| [15:37:42] |
<Blackhex> |
I do, one hour I was setting out everithing and when I want to start install it crashed :-( |
| [15:37:51] |
<pacopablo> |
hehe :) |
| [15:37:52] |
* |
stevegt has quit IRC |
| [15:38:01] |
<pacopablo> |
I usually start from a base image that I have |
| [15:38:13] |
<pacopablo> |
so install takes ~15 mins |
| [15:38:21] |
<Blackhex> |
So I installed system old way |
| [15:38:30] |
<pacopablo> |
depending on the speed of the disks and how long it takes to untar |
| [15:38:48] |
* |
p |