RE: [Trac] RE: Help with Trac Commit Ticket Updater
[Please reply in-line, it makes it easier to read...] > > -Original Message- > > From: trac-users@googlegroups.com On Behalf Of Patty Cottrill > > Sent: 26 October 2011 00:50 > > Subject: [Trac] Help with Trac Commit Ticket Updater > > > > Hi Guys, > > > > I need some help with this new component that is supposed to be > > included with Trac v.12. > > I have tried to implement, but its not working for me at all. > > The documentation refers to a script called > > commit_updater.py, but I can't find it anywhere on our server. > > Am I supposed to download this to the server and if so, where > > am I supposed to place it? > > The documentation is not very clear, at least not to me: > > http://trac.edgewall.org/wiki/CommitTicketUpdater > > > > I have read the document reference above, plus > > http://trac.edgewall.org/wiki/TracRepositoryAdmin#ExplicitSync. > > I followed the instructions, but no luck. > > > > I enabled the compoments on trac.ini > > I enabled & edited the post-commit under the svn/hooks directory as > > instructed I added the configuration from the second document. > > > > What am I missing? > > Please advise. > > > > -Patty > > > -Original Message- > From: trac-users@googlegroups.com On Behalf Of Cooke, Mark > Sent: Wednesday, October 26, 2011 3:49 AM > Subject: [Trac] RE: Help with Trac Commit Ticket Updater > > I followed that advice and got it working on windows, I'm guessing > you are on *nix? It would help if you could provide a bit more > information, e.g. platform, trac version etc. Can you post the > relevant bits of your trac.ini and your hook script? > > ~ mark c > > -Original Message- > From: trac-users@googlegroups.com On Behalf Of Patty Cottrill > Sent: 26 October 2011 17:11 > To: trac-users@googlegroups.com > Subject: RE: [Trac] RE: Help with Trac Commit Ticket Updater > > oops sorry about that. > > Kubuntu 10.04 > Trac 0.12.2 > Python2.6.5 (r265:79063, Apr 16 2010, 13:28:26) [GCC 4.4.3] > Subversion1.6.6 (r40053) Hmm, OK, I have limited *nix experience but here goes... > Per the instructions on > http://trac.edgewall.org/wiki/TracRepositoryAdmin#ExplicitSync > I added the following to the post-commit under the svn/project/hooks > directory: > > export PYTHON_EGG_CACHE="/home/trac/project" > /usr/bin/trac-admin /home/trac/project changeset added "$1" "$2" > > also commented out the following line that was included in the > post-commit template: > > #"$REPOS"/hooks/mailer.py commit "$REPOS" $REV "$REPOS"/mailer.conf > > Made sure it was executable by owner, users & groups. ...and that includes the user that runs trac? How are you serving trac/svn, via apache or standalone? You need to make sure that the apache user is included (or better the owner, AFAI...understand). Can you confirm that your value for "PYTHON_EGG_CACHE" matches your web server config? This is only needed "if you changed it from its default location". Also, how is your svn configured, via trac.ini or via the admin repository command? If the former, you may need to add `[Trac]` `repository_sync_per_request = false`, see http://trac.edgewall.org/wiki/TracRepositoryAdmin#PerRequestSync > Per the instructions on > http://trac.edgewall.org/wiki/CommitTicketUpdater > I added the following to trac.ini: > > Under [Components] > tracopt.ticket.commit_updater.* = enabled > > Under [Ticket] > commit_ticket_update_envelope = > commit_ticket_update_commands.close = close closed closes fix fixed fixes > commit_ticket_update_commands.refs = > commit_ticket_update_check_perms = true > commit_ticket_update_notify = true ...that all looks ok. What did you use for a commit message and what (if anything) happened in your trac? > As I stated in my email, I can not find anywhere on the server the > script commit_updater.py. > Shouldn't I be able to see that script somewhere on the server? > > -Patty > More digging leads me to http://trac.edgewall.org/wiki/CommitTicketUpdater#Location which says that the script is part of the trunk source tree, so it will be in the trac install or egg (if you use an egg). I suspect a permissions issue, can you check that again? Otherwise, do you have logging enabled to DEBUG in your Trac? Can you try a commit and see if anything appears in the log? ~ mark c -- You received this message because you are subscribed to the Google Groups "Trac Users" group. To post to this group, send email to trac-users@googlegroups.com. To unsubscribe from this group, send email to trac-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.
RE: [Trac] RE: Help with Trac Commit Ticket Updater
oops sorry about that. Kubuntu 10.04 Trac 0.12.2 Python 2.6.5 (r265:79063, Apr 16 2010, 13:28:26) [GCC 4.4.3] Subversion 1.6.6 (r40053) Per the instructions on http://trac.edgewall.org/wiki/TracRepositoryAdmin#ExplicitSync I added the following to the post-commit under the svn/project/hooks directory: export PYTHON_EGG_CACHE="/home/trac/project" /usr/bin/trac-admin /home/trac/project changeset added "$1" "$2" also commented out the following line that was included in the post-commit template: #"$REPOS"/hooks/mailer.py commit "$REPOS" $REV "$REPOS"/mailer.conf Made sure it was executable by owner, users & groups. Per the instructions on http://trac.edgewall.org/wiki/CommitTicketUpdater I added the following to trac.ini: Under [Components] tracopt.ticket.commit_updater.* = enabled Under [Ticket] commit_ticket_update_envelope = commit_ticket_update_commands.close = close closed closes fix fixed fixes commit_ticket_update_commands.refs = commit_ticket_update_check_perms = true commit_ticket_update_notify = true As I stated in my email, I can not find anywhere on the server the script commit_updater.py. Shouldn't I be able to see that script somewhere on the server? -Patty -Original Message- From: trac-users@googlegroups.com [mailto:trac-users@googlegroups.com] On Behalf Of Cooke, Mark Sent: Wednesday, October 26, 2011 3:49 AM To: trac-users@googlegroups.com Subject: [Trac] RE: Help with Trac Commit Ticket Updater > -Original Message- > From: trac-users@googlegroups.com > [mailto:trac-users@googlegroups.com] On Behalf Of Patty Cottrill > Sent: 26 October 2011 00:50 > To: Trac Users > Subject: [Trac] Help with Trac Commit Ticket Updater > > Hi Guys, > > I need some help with this new component that is supposed to be > included with Trac v.12. > I have tried to implement, but its not working for me at all. > The documentation refers to a script called commit_updater.py, but I > can't find it anywhere on our server. > Am I supposed to download this to the server and if so, where am I > supposed to place it? > The documentation is not very clear, at least not to me: > http://trac.edgewall.org/wiki/CommitTicketUpdater > > I have read the document reference above, plus > http://trac.edgewall.org/wiki/TracRepositoryAdmin#ExplicitSync. > I followed the instructions, but no luck. > > I enabled the compoments on trac.ini > I enabled & edited the post-commit under the svn/hooks directory as > instructed I added the configuration from the second document. > > What am I missing? > Please advise. > > -Patty > I followed that advice and got it working on windows, I'm guessing you are on *nix? It would help if you could provide a bit more information, e.g. platform, trac version etc. Can you post the relevant bits of your trac.ini and your hook script? ~ mark c -- You received this message because you are subscribed to the Google Groups "Trac Users" group. To post to this group, send email to trac-users@googlegroups.com. To unsubscribe from this group, send email to trac-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/trac-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Trac Users" group. To post to this group, send email to trac-users@googlegroups.com. To unsubscribe from this group, send email to trac-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.
RE: [Trac] Re: How do I include javascript in trac genshi template?
> On Oct 26, 11:57 am, "Cooke, Mark" wrote: > > Folks, > > > > I am trying to put some javascript into my genshi template > > (for a plugin) but it is rejected as follows: > > > > TemplateSyntaxError: not well-formed (invalid token): line > > 32, column 18 > > > > ...which turns out to be the first '<' character in the line: > > > > if (atpos<1 || dotpos=x.length) > > > > So I have been searching to find out how to include > > javascript in genshi templates and can only find questions > > but no documentation or answers I understand. > > > > I am using `` and trying > > to include the ... in the ... > > block. What am I doing wrong? > > > > Many thanks for any help, > > > > ~ mark c > -Original Message- > From: trac-users@googlegroups.com On Behalf Of osimons > Sent: 26 October 2011 15:41 > To: Trac Users > Subject: [Trac] Re: How do I include javascript in trac > genshi template? > > Templates are XHTML and need to be parsed correctly. < is a token > reserved for XML tags/elements, so you need to escape it (as <) > or wrap the code in a CDATA section. This is a general web > XML/XHTML/HTML/JavaScript issue, and lots of information > available on the web: > > http://stackoverflow.com/questions/66837/when-is-a-cdata-section-necessary-within-a-script-tag > > > :::simon Thanks very much simon, that is a great post to reference. For the list, I fixed my issue by moving the offending code into an external file (when I eventually worked out how the INavigationContributor get_navigation_items function should work), however the post referenced seems to recommend the following construct:- // Thanks again, ~ mark c -- You received this message because you are subscribed to the Google Groups "Trac Users" group. To post to this group, send email to trac-users@googlegroups.com. To unsubscribe from this group, send email to trac-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.
[Trac] Re: How do I include javascript in trac genshi template?
On Oct 26, 11:57 am, "Cooke, Mark" wrote: > Folks, > > I am trying to put some javascript into my genshi template (for a plugin) but > it is rejected as follows: > > TemplateSyntaxError: not well-formed (invalid token): line 32, column 18 > > ...which turns out to be the first '<' character in the line: > > if (atpos<1 || dotpos=x.length) > > So I have been searching to find out how to include javascript in genshi > templates and can only find questions but no documentation or answers I > understand. > > I am using `` and trying to include the > ... in the ... block. What am I doing wrong? > > Many thanks for any help, > > ~ mark c Templates are XHTML and need to be parsed correctly. < is a token reserved for XML tags/elements, so you need to escape it (as <) or wrap the code in a CDATA section. This is a general web XML/XHTML/HTML/ JavaScript issue, and lots of information available on the web: http://stackoverflow.com/questions/66837/when-is-a-cdata-section-necessary-within-a-script-tag :::simon -- You received this message because you are subscribed to the Google Groups "Trac Users" group. To post to this group, send email to trac-users@googlegroups.com. To unsubscribe from this group, send email to trac-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.
[Trac] How do I include javascript in trac genshi template?
Folks, I am trying to put some javascript into my genshi template (for a plugin) but it is rejected as follows: TemplateSyntaxError: not well-formed (invalid token): line 32, column 18 ...which turns out to be the first '<' character in the line: if (atpos<1 || dotpos=x.length) So I have been searching to find out how to include javascript in genshi templates and can only find questions but no documentation or answers I understand. I am using `` and trying to include the ... in the ... block. What am I doing wrong? Many thanks for any help, ~ mark c -- You received this message because you are subscribed to the Google Groups "Trac Users" group. To post to this group, send email to trac-users@googlegroups.com. To unsubscribe from this group, send email to trac-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.
Re: [Trac] Re: How to customise the report.css templates for all managed trac projects
Remy Blank skrev 26. okt. 2011 08:10: > osimons wrote: (...) >> http://trac.edgewall.org/wiki/TracInterfaceCustomization#SiteAppearance > > I have always found that this was a lot of effort just to add a custom > stylesheet. (...) > Moreover, I don't think we can expect admins to understand Genshi > templates. I don't think it's unreasonable to expect admins to understand Genshi templates (enough to cut and paste) -- but it should be unessecary for admins to *have* to deal with templates just to change a few colours. It kind of defies the purpose of using css for (part of) the styling in the first place if you have to rewrite document structure to set a few styles. > Couldn't we add the custom stylesheet to the layout.html file > automatically, based on the presence of the style.css file in htdocs? > We could even add an option to configure the path to the file. Then > again, the mapping from file path to URL is non-trivial if the file is > outside of htdocs, which is often the case in large(er) installations, > so maybe that's a bad idea. Well, by that argument we should remove [header_logo]. I'd rather see [custom_css] added, allowing to inculde a single css-file in all pages. Eg: [custom_css] src = /site/style/local.css After all, when you change the logo to something with a different colour-selection than red/black/white you absolutely *have* to change the color theme :-) I couldn't find a ticket on this -- should we make one? Best regards, -- .---. Eirik Schwenke ( NSD ) Harald Hårfagresgate 29Rom 150 '---' N-5007 Bergentlf: (555) 889 13 GPG-key at pgp.mit.edu Id 0x8AA3392C signature.asc Description: OpenPGP digital signature
[Trac] RE: Help with Trac Commit Ticket Updater
> -Original Message- > From: trac-users@googlegroups.com > [mailto:trac-users@googlegroups.com] On Behalf Of Patty Cottrill > Sent: 26 October 2011 00:50 > To: Trac Users > Subject: [Trac] Help with Trac Commit Ticket Updater > > Hi Guys, > > I need some help with this new component that is supposed to > be included with Trac v.12. > I have tried to implement, but its not working for me at all. > The documentation refers to a script called > commit_updater.py, but I can't find it anywhere on our server. > Am I supposed to download this to the server and if so, where > am I supposed to place it? > The documentation is not very clear, at least not to me: > http://trac.edgewall.org/wiki/CommitTicketUpdater > > I have read the document reference above, plus > http://trac.edgewall.org/wiki/TracRepositoryAdmin#ExplicitSync. > I followed the instructions, but no luck. > > I enabled the compoments on trac.ini > I enabled & edited the post-commit under the svn/hooks > directory as instructed > I added the configuration from the second document. > > What am I missing? > Please advise. > > -Patty > I followed that advice and got it working on windows, I'm guessing you are on *nix? It would help if you could provide a bit more information, e.g. platform, trac version etc. Can you post the relevant bits of your trac.ini and your hook script? ~ mark c -- You received this message because you are subscribed to the Google Groups "Trac Users" group. To post to this group, send email to trac-users@googlegroups.com. To unsubscribe from this group, send email to trac-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.