[Trac] Re: Preliminary port of Tags to 0.11
On 8/15/07, cobwebsmasher [EMAIL PROTECTED] wrote: Alec, I'm eager to try out your port. I have 3 questions before I try 1) - the default_handler requirement being removed - are you saying that the default_handler line shouldn't exist at all even if it is set to an actual default value? Explicitly setting it to WikiModule is also fine. 2) - I have multiple instances of Trac living on the same machine. None of them are using Tags currently as they are both built off of 0.11 - if the default_handler line isn't present, is your install just making tags a core feature or will it show up as a plugin that can be activated/deactivated? It is still a plugin, it's just using an alternate mechanism to add the tags features to the Wiki edit and view pages. It can still be enabled and disabled in the standard fashion: [component] tractags.* = enabled 3) - Also curious as to whether or not you know how this port affects the Blog plugin? I'm not 100% sure, but I believe blog needs to be ported to 0.11 as well. It might work though, you never know :) --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/trac-users?hl=en -~--~~~~--~~--~--~---
[Trac] Re: Preliminary port of Tags to 0.11
Excellent, thanks Gary :) On 8/15/07, Gary Oberbrunner [EMAIL PROTECTED] wrote: Alec Thomas wrote: Hello, I've made a start at porting Tags to 0.11. It's pretty much feature equivalent to the 0.10 version as it stands. To try it out: easy_install http://trac-hacks.org/svn/tagsplugin/trunk/ It requires Genshi trunk, so it'll probably pull that down as well. Works for me against current Trac trunk, r5903. Please test and respond with any issues. Hi Alec -- thanks very much for this! I just updated to the trac trunk and installed tags as above. Basic things work out of the box. I got an error with the following tags URL: http://www/trac/tags/foobar NameError: global name 'escape' is not defined I fixed that by importing 'escape' from trac.util.html in web_ui.py. But then I get another error later on while processing the same URL: AttributeError: 'NoneType' object has no attribute 'perm' This is deep in the formatter code. Apparently at tractags/macros.py line 215, there's this code: htitle = wiki_to_oneliner(title, self.env) which ends up calling back like this: ...Trac-0.11dev_r5912-py2.4.egg/trac/wiki/formatter.py:1052 ...Trac-0.11dev_r5912-py2.4.egg/trac/wiki/formatter.py: 881 (format) ... then into python's SRE module, and then back out: ...Trac-0.11dev_r5912-py2.4.egg/trac/wiki/formatter.py: 735 (replace) ...Trac-0.11dev_r5912-py2.4.egg/trac/wiki/formatter.py:728 (handle_match) ...Trac-0.11dev_r5912-py2.4.egg/trac/wiki/api.py: 309 (wikipagename_link) ...Trac-0.11dev_r5912-py2.4.egg/trac/wiki/api.py:345 (format_link) and that last function wants a Request object from the formatter, which it turns out is None: req = formatter.context.req context = Context(self.env, req)('wiki', id=page, version=version) if 'WIKI_VIEW' not in req.perm(context): So I fixed that by passing the req object into wiki_to_oneliner in both places in macros.py. Then I'd get the same error when I explicitly call [[ListTagged('foo')]] in a wiki page: Error: Macro ListTagged('releaseprocedure') failed 'NoneType' object has no attribute 'perm' so I just looked around and passed the req object into a few more places. Now everything seems to be working for me! I'm extremely happy to be able to run 0.11 now!!! Patch attached. I'll submit it to trac-hacks as well. -- Gary Oberbrunner Index: tractags/api.py === --- tractags/api.py (revision 2566) +++ tractags/api.py (working copy) @@ -108,7 +108,7 @@ Remove all tags from a name in a tagspace. self.remove_tags(req, name, self.get_name_tags(name)) -def name_details(self, name): +def name_details(self, req, name): Return a tuple of (href, htmllink, title). eg. (/ticket/1, a href=/ticket/1#1/a, Broken links) raise NotImplementedError @@ -174,10 +174,10 @@ cursor.execute('DELETE FROM tags WHERE tagspace=%s AND name=%s', (self.tagspace, name)) db.commit() -def name_details(self, name): +def name_details(self, req, name): from trac.wiki.formatter import wiki_to_oneliner return (getattr(self.env.href, self.tagspace), -wiki_to_oneliner('[%s:%s %s]' % (self.tagspace, name, name), self.env), '') +wiki_to_oneliner('[%s:%s %s]' % (self.tagspace, name, name), self.env, req=req), '') class TagspaceProxy: A convenience for performing operations on a specific tagspace, @@ -356,10 +356,10 @@ return result -def name_details(self, tagspace, name): +def name_details(self, tagspace, req, name): Return a tuple of (href, htmllink, title). eg. (/ticket/1, a href=/ticket/1#1/a, Broken links) -return self._get_tagsystem(tagspace).name_details(name) +return self._get_tagsystem(tagspace).name_details(req, name) # ITaggingSystemProvider methods def get_tagspaces_provided(self): Index: tractags/web_ui.py === --- tractags/web_ui.py (revision 2566) +++ tractags/web_ui.py (working copy) @@ -6,7 +6,7 @@ from trac.web.chrome import ITemplateProvider, INavigationContributor, add_stylesheet from trac.web.api import ITemplateStreamFilter from trac.wiki.api import IWikiPageManipulator -from trac.util.html import Markup +from trac.util.html import Markup, escape from trac.util.compat import set from trac.wiki.web_ui import WikiModule from trac.wiki.formatter import wiki_to_oneliner Index: tractags/ticket.py === --- tractags/ticket.py (revision 2566) +++ tractags/ticket.py (working copy) @@ -82,12 +82,12 @@ ticket['keywords'] = '' ticket.save_changes(req.authname, None) -def
[Trac] Re: Import Jira into Trac
On Tue, 2007-08-14 at 19:29 +, Yaroslav Markin wrote: A bit of offtopic, are you in any way not satisfied with Jira and why? My ( boss) main problem is the price tag for the product. If not for the price tag I could live with the complexity of the product and the fact that I need a second application for documentation purposes (e.g. Confluence which I also must pay for). I really like the minimalistic approach of Trac. I'm now planning which tracker should I use for a new project, and have to made a choice of Jira vs Trac. I would go for Trac except if you need the additional features -- Groeten, Joost Kraaijeveld Askesis B.V. Molukkenstraat 14 6524NB Nijmegen tel: 024-3888063 / 06-51855277 fax: 024-3608416 web: www.askesis.nl --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/trac-users?hl=en -~--~~~~--~~--~--~---
[Trac] Re: Deployment and Versions
Jason, based in that message I did a process ( little based on bitten concepts :-]) according to your idea. but, I miss something about subversion. when You say: your release. And, the developers working on trunk are completely unaffected as you are working in different directories. Of course, there are more naming schemes/methods than the one I just mentioned. I understood, I've a release 1.34.1 working well, and trunk ( 1.35) don't was affected. How can I do to buid 1.35 with all fixes of 1.34.1? What the best way to merge both versions? You got? I think that can be resolved with merge between 1.34.1 and trunk, then I can buid 1.35 as well. Thx On 8/7/07, Jason Winnebeck [EMAIL PROTECTED] wrote: If I understand you correctly, you have it almost-but-not-quite. You are mentioning working with files, but instead you should work with directories/projects. Don't tag just a single file. You need to manage each releasable unit separately. A unit may not necessarily correspond to a direct customer deliverable (it could just be a JAR/DLL/etc). You mentioned subproject but I don't entirely get your setup so for this example I will assume you have a single project/product. OK, so you work towards 1.34 and you make trunk be the code you want for 1.34 and you want to release. You tag trunk by copying the entire trunk directory into tags/1.34. Now in trunk you start working to 1.35. But, a customer finds a bug in 1.34, and you need to support that release and make a 1.34.1, what do you do? You copy the entire tags/1.34 into branches/1.34.1. Again, the whole directory, not just a file, so you have the ENTIRE 1.34.1 codebase in there. You work in the 1.34.1 branch, and when you are done and ready to release, you copy brances/1.34.1 to tags/1.34.1. So in the tags directory you have 1 directory for each release. If you want to see the code for a specific version you just get the code in the tags/whatever directory. Because you copied (tagged) everything, all of the code is in there and you can reconstruct entirely any version of your release. And, the developers working on trunk are completely unaffected as you are working in different directories. Of course, there are more naming schemes/methods than the one I just mentioned. Jason From: trac-users@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Lucas Stephanou Sent: Monday, August 06, 2007 11:01 AM To: trac-users@googlegroups.com Subject: [Trac] Re: Deployment and Versions Thx for help Jason. You got the idea :-) Let's go ahead with this, thinking in this situation: I had a stable version 1.34 (subprojectA) and part of development team is working into a new features to version 1.35 ( trunk) but there is a bug happening in 1.34 , I'm reallocate one of developers to correct this, and he made some corrections on project/subprojectA/dir1/file1.py then he tag this file with 1.34.1 tag , I generate 1.34.1 and deploy to customer. After some time I had 1.35 ready to go. But on this time I want to send all subprojectA. What is correct way to do this. Just svn copy of trunk to tag 1.35?? and what can I do if in the future I want to regenerate subprojectA version 1.34.1 with full tree. This is my question. -- Lucas Stephanou --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/trac-users?hl=en -~--~~~~--~~--~--~---
[Trac] Question regarding the repository
Hi, le's assume I have a svn repository looking like this: \ | \--trunk | \--tags | \--branches | \--branch1 | \--branch2 Is it possible to have a trac using e.g. branch1 as repository? I think not, but hopefully, I am wrong? Rainer --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/trac-users?hl=en -~--~~~~--~~--~--~---
[Trac] Re: On-the-fly format conversion for display of man pages
On Aug 10, 3:25 am, Matt Good [EMAIL PROTECTED] wrote: You can write a plugin which implements the IHTMLPreviewRenderer for the mime type and converts the file into HTML. I don't know what libraries or tools are available for doing this on the man format, but if you find one you can use it from your plugin. http://trac.edgewall.org/browser/trunk/trac/mimeview/api.py?rev=5889#... Ok cheers - I'll take a look at that. One can use the unix man command itself to generate HTML: 'man -Thtml' (or nroff -Thtml), I'm not sure if there's a python library that does it? Thanks, Piers. -- Matt On Aug 9, 6:47 am, p.ohanlon [EMAIL PROTECTED] wrote: Hi, I was wondering if anyone knew how to get Trac to convert native man pages from their nroff format to HTML or moinmoin format so that they can viewed sensibly in Trac? I imagine a number of projects have man pages in them but it's not clear how one can get Trac to convert them on-the-fly so that users can view their contents properly laid out? I can see that one could utilise groff/nroff in a CGI script but I wondered if there was anything built-in to Trac. It seems that the argument to browsed files (e.g. ?format=txt) could be used to trigger some internal conversion? Thanks, Piers O'Hanlon --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/trac-users?hl=en -~--~~~~--~~--~--~---
[Trac] Re: help with trac-post-commit-hook for MySQL
Hi, johannes, Thanks for your comments. When I removed post-commit-hook or trac-post-commit-hook, no errors showed up. I also tried clean up but still getting the same errors... When I changed the database to Sqlite, it works fine. So I think there are no problem on trac-post-commit-hook execution permission. Maybe I need to debug trac-post-commit-hook script... =( I cannot think anything else. One day if I solved it, I'll post here. By the way, I only changed the database property in trac.ini to switch between Sqlite and MySQL. Do I need to change any other files or properties? Tiffany On 8月15日, 午前5:58, jtuchscherer [EMAIL PROTECTED] wrote: Hi Tiffany, This sounds more like a general subversion error than something that is not bound to the post commit hook. Did this error show up after you enabled the post commit hook? Did you try a clean up after you are adding something? The only thing I needed to check when I enabled thetrac postcommit hook was that subversion's apache server has all needed rights to execute thetrac-post-commit-hook script. HTH johannes On Aug 14, 7:35 am, tiffany [EMAIL PROTECTED] wrote: johannes, thanks for your reply. I'm using TortoiseSVN as my client. Whenever I commited (after added, modified, or deleted), the following errors showed up on the console. Something is wrong at MERGE. === Adding: test\aaa.txt Sending content: test\aaa.txt Error: Commit failed (details follow): Error: MERGE request failed on '/repos/test' Error: MERGE of '/repos/test': 200 OK (http://...) === Then, after I added a file and use the update command, I got the following error. === Error: Failed to add file 'test\aaa.txt': object of the same name already exists === When I deleted the .svn folder, I can use the update command without any error. I can get the updated files and folders, and the files that I added above as well. Thanks. On 8月14日, 午前1:24, jtuchscherer [EMAIL PROTECTED] wrote: Hi there, The post commit hook works fine for us with the same setup you have. If you let me know what problems you have I will try tohelpyou sorting them out. Best, johannes On Aug 13, 8:44 am, tiffany [EMAIL PROTECTED] wrote: Hi. I'm using Trac0.10.4, SVN1.4.4, and MySQL4.x on Linux. I want to use thetrac-post-commit-hook, but it only works for Sqlite. Does anyone know how to make it work for MySQL? Thanks in advance.- 引用テキストを表示しない - - 引用テキストを表示 -- 引用テキストを表示しない - - 引用テキストを表示 - --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/trac-users?hl=en -~--~~~~--~~--~--~---
[Trac] Re: Question regarding the repository
Just give repo_dir as /path/to/repo/branches/branch1. Subversion will figure out what you mean. --Noah Rainer Sokoll wrote: Hi, le's assume I have a svn repository looking like this: \ | \--trunk | \--tags | \--branches | \--branch1 | \--branch2 Is it possible to have a trac using e.g. branch1 as repository? I think not, but hopefully, I am wrong? Rainer --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/trac-users?hl=en -~--~~~~--~~--~--~---
[Trac] Re: Using InterTrac
Any other thoughts about this? Is there any additional information I should be providing? I still haven't gotten this to work, so I thought I'd ping one more time... Thanks again. On 8/14/07, Rob Wilkerson [EMAIL PROTECTED] wrote: What Trac version is frequencyreach running? If it's an old one (pre-0.10, IIRC), then trac.compat shouldn't be set to false. -- Christian Both projects are running 0.10.4. When I click my InterTrac link, it tries to take me to [frequencyreach URI]/source/trunk/_meta/deploy/build.xml. So there's a direct correlation between the syntax I'm using and the resulting URI, but not the right one. Internal source: links work as expected. Thanks. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/trac-users?hl=en -~--~~~~--~~--~--~---
[Trac] format included wiki text as html?
Hi; I'm writing a sort of wiki-Include plugin for 0.11. I have my expand_macro(self, formatter, name, args) function implemented, and it wants to take some wiki-formatted text and return it from the macro. I understand macros have to return HTML, right? (Not sure how nested macros work in that situation, but anyway...) what do I call to process a string of wiki text into html? I tried formatter.format(text) but that didn't work. I'd like to do this without any deprecated methods (e.g. wiki_to_html?) too. thanks, -- Gary --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/trac-users?hl=en -~--~~~~--~~--~--~---
[Trac] Trac in Fink: upgrading to sqlite3
If you are using the version of Trac in Fink, be forewarned that for 0.10.4, we will be upgrading the pysqlite dependency to only use pysqlite2, not whichever version happens to be installed. (Yes, I realize 0.10.4 has been out for a while.) In practical terms, this means that if you did not have pysqlite2 installed when you installed trac-py23 or trac-py24, your trac.db would most likely be in sqlite2 format. After upgrading the trac package, you can upgrade the database to sqlite3 (as used by pysqlite2) as follows: fink install sqlite sqlite3 mv trac.db trac.db.bak sqlite trac.db.bak .dump | sqlite3 trac.db (restart trac) Since the Fink package does not place restrictions on where your Trac environments are stored, we won't be able to easily automate this upgrade procedure. Please direct your questions to [EMAIL PROTECTED] --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/trac-users?hl=en -~--~~~~--~~--~--~---