Re: [Trac] Help adding SVN repo to trac 1.6

2024-03-22 Thread Jun Omae
On Fri, Mar 22, 2024 at 12:01 AM 'Steve Kreisler' via Trac Users
 wrote:
>
> Hi,
>
> Can you please help me configure the SVN repo in Trac 1.6? We ported an old 
> Trac version to 1.6 on Oracle Linux 8.9 and although the tickets/wiki works 
> great, we cannot get it to recognize our svn repository. I am getting the 
> error: InvalidConnector: Unsupported version control system "svn": cannot 
> import name 'fs'.  I have read 
> https://groups.google.com/g/trac-users/c/xLe5a44ekjg and (I think) followed 
> the suggestions in the replies.
>
> SVN is enabled in the trac.ini. The server has python version 3.6.8 and is 
> running svn 1.14.1 and has the following subversion libraries installed:
>
> subversion-libs-1.14.1-2.module+el8.7.0+20805+939fe0ca.x86_64
> subversion-tools-1.14.1-2.module+el8.7.0+20805+939fe0ca.x86_64
> python3-subversion-1.14.1-2.module+el8.7.0+20805+939fe0ca.x86_64
> subversion-1.14.1-2.module+el8.7.0+20805+939fe0ca.x86_64
>
> When I try to verify the loading of the bindings with the python interpreter, 
> I get:
>
> $ python3
> Python 3.6.8 (default, Jan 16 2024, 02:08:59)
> [GCC 8.5.0 20210514 (Red Hat 8.5.0-20.0.1)] on linux
> Type "help", "copyright", "credits" or "license" for more information.
> >>> from svn import core
> Traceback (most recent call last):
>   File "", line 1, in 
> ImportError: cannot import name 'core'
> >>> from libsvn import core
> >>> (core.SVN_VER_MAJOR, core.SVN_VER_MINOR, core.SVN_VER_MICRO, 
> >>> core.SVN_VER_PATCH)
> (1, 14, 1, 1)

I just tried to reproduce it but unable to reproduce it.
The import works fine with fresh Oracle Linux 8.9 on Docker image.

I guess that your installation has something wrong. How about
reinstalling the packages?

[[[
jun66j5@localhost:430$ podman run --rm -it oraclelinux:8.9 /bin/bash --login -i

[root@0c405ab6def0 /]# dnf module enable subversion:1.14
[root@0c405ab6def0 /]# dnf install -y subversion python36 python3-subversion
[root@0c405ab6def0 /]# rpm -q subversion python3-subversion
subversion-1.14.1-2.module+el8.7.0+20805+939fe0ca.x86_64
python3-subversion-1.14.1-2.module+el8.7.0+20805+939fe0ca.x86_64
[root@0c405ab6def0 /]# svn --version --quiet
1.14.1
[root@0c405ab6def0 /]# python3 -V
Python 3.6.8
[root@0c405ab6def0 /]# python3 -c 'from svn import core;
print(core.SVN_VERSION)'
b'1.14.1 (r1886195)'
]]]

-- 
Jun Omae  (大前 潤)

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/CAEVLMahmMALEWJ3LfPBdaoW5Pv1Dbpo_tFCPF2Zk3H636xMpDg%40mail.gmail.com.


Re: [Trac] Help setting up Trac 1.6

2024-03-07 Thread Jun Omae
On Thu, Mar 7, 2024 at 1:33 AM Jean-Marc Lasgouttes
 wrote:
>
> 1/ I have added to [components]
>tracopt.ticket.deleter.* = enabled
> but I fail to see any Delete button in the ticket UI. How does this
> work? I do have TRAC_ADMIN permission.
>
>
> 2/ I installed TracKeywordsPlugin, have added to [components]
>trackeywords.web_ui.* = enabled
> and a (dummy) section
>
> [keywords]
> patch = A patch is available for this issue
> regression = This bug is new in this version
>
> I see the plugin from the administrative page, but… I do not see any new
> keywords UI on the tickets page (I did restart apache).

Check no errors in javascript console.
Both the deleter feature and the trackeywordsplugin work fine on my environment.

-- 
Jun Omae  (大前 潤)

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/CAEVLMajuWBSP6P22iwhckhm97_u7qfmn1CMMRL0JTGatV6hfSw%40mail.gmail.com.


Re: [Trac] Help setting up Trac 1.6

2024-03-07 Thread Jean-Marc Lasgouttes

Le 06/03/2024 à 17:33, Jean-Marc Lasgouttes a écrit :

Le 04/03/2024 à 23:19, Jean-Marc Lasgouttes a écrit :

Le 04/03/2024 à 20:19, phep a écrit :
Is there any particular reason to stick with mod_python instead of, 
say, mod_wsgi ?


Because I do not know what I am doing? But I realized a few hours ago 
than swgi is probably a better choice.


Hello,

So, with wsgi, everything seems to work :) Thanks for the tip.

I still have issues, though.

1/ I have added to [components]
   tracopt.ticket.deleter.* = enabled
but I fail to see any Delete button in the ticket UI. How does this 
work? I do have TRAC_ADMIN permission.



2/ I installed TracKeywordsPlugin, have added to [components]
   trackeywords.web_ui.* = enabled
and a (dummy) section

[keywords]
patch = A patch is available for this issue
regression = This bug is new in this version

I see the plugin from the administrative page, but… I do not see any new 
keywords UI on the tickets page (I did restart apache).



3/ I have configured 2 git repos, but one of them gives an error (coming 
from trac-admin) like

InvalidRepository: "features" is not readable or not a Git repository.

Git seems to think that this is a perfectly valid repo and I 
double-checked that it is owned by www-data.


I have a solution to this last question. The repository was recorded not 
in trac.ini, but in the database itself, accessible through trac-admin.


This begs a new question:

4/ This is confusing to me. What are the things that are advised to be 
configured in trac.ini, and what are those which should be done in the db?


And for good measure, I have a new one:

5/ Our git repository is on a different machine than our web server, 
which handles trac. What are the good mechanisms that you might know of 
to make sure that trac on www.lyx.org is updated whenever something is 
pushed to git.lyx.org?


We have an hourly cron job for now, but it is not very satisfying.

Best regards,
Jean-Marc

--
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/f0c6e8fd-759b-4884-ab92-e05fa1a2d694%40free.fr.


Re: [Trac] Help setting up Trac 1.6

2024-03-06 Thread Jean-Marc Lasgouttes

Le 04/03/2024 à 23:19, Jean-Marc Lasgouttes a écrit :

Le 04/03/2024 à 20:19, phep a écrit :
Is there any particular reason to stick with mod_python instead of, 
say, mod_wsgi ?


Because I do not know what I am doing? But I realized a few hours ago 
than swgi is probably a better choice.


Hello,

So, with wsgi, everything seems to work :) Thanks for the tip.

I still have issues, though.

1/ I have added to [components]
  tracopt.ticket.deleter.* = enabled
but I fail to see any Delete button in the ticket UI. How does this 
work? I do have TRAC_ADMIN permission.



2/ I installed TracKeywordsPlugin, have added to [components]
  trackeywords.web_ui.* = enabled
and a (dummy) section

[keywords]
patch = A patch is available for this issue
regression = This bug is new in this version

I see the plugin from the administrative page, but… I do not see any new 
keywords UI on the tickets page (I did restart apache).



3/ I have configured 2 git repos, but one of them gives an error (coming 
from trac-admin) like

InvalidRepository: "features" is not readable or not a Git repository.

Git seems to think that this is a perfectly valid repo and I 
double-checked that it is owned by www-data.


So how can I know what annoys trad-admin?


Sorry for the never-ending stream of questions.

Best,
Jean-Marc

--
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/f4f3941f-cff5-4026-bcd3-f144babfc334%40free.fr.


Re: [Trac] Help setting up Trac 1.6

2024-03-06 Thread Jean-Marc Lasgouttes

Le 05/03/2024 à 00:13, Martin a écrit :

Also, nginx with gunicorn works well on Debian.
I guess, it will be the same on Ubuntu.
Whatever works for you ;-)


Thanks for the advice Martin. Unfortunately, the choice is already made: 
it is an apache2-based box (but it works now!).


JMarc


--
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/4622bdfc-073c-4c97-add2-4a4aec930265%40free.fr.


Re: [Trac] Help setting up Trac 1.6

2024-03-04 Thread Martin
On 2024-03-04 20:19, phep wrote:
> Le 04/03/2024 à 17:20, Jean-Marc Lasgouttes a écrit :
>  [Mon Mar 04 14:49:52.948910 2024] [:error] [pid 7673] [client 
> 128.93.65.20:45406] PythonHandler trac.web.modpython_frontend:
>  ValueError: failed to parse CPython sys.version: '3.12.2' 
>
> This reminds me of this Debian bug. This is the kind of problem that moved us 
> away from mod_python a dozen years ago.
>
> Is there any particular reason to stick with mod_python instead of, say, 
> mod_wsgi ? 

Also, nginx with gunicorn works well on Debian.
I guess, it will be the same on Ubuntu.
Whatever works for you ;-)

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/87plw9twq8.fsf%40fama.lan.


Re: [Trac] Help setting up Trac 1.6

2024-03-04 Thread Jean-Marc Lasgouttes

Le 04/03/2024 à 20:19, phep a écrit :

Hi,

Le 04/03/2024 à 17:20, Jean-Marc Lasgouttes a écrit :
[Mon Mar 04 14:49:52.948910 2024] [:error] [pid 7673] [client 
128.93.65.20:45406] PythonHandler trac.web.modpython_frontend: 
ValueError: failed to parse CPython sys.version: '3.12.2'


This reminds me of this Debian bug 
. This is the 
kind of problem that moved us away from mod_python a dozen years ago.


Hi Phep,

Thanks for your prompt answer.

Is there any particular reason to stick with mod_python instead of, say, 
mod_wsgi ?


Because I do not know what I am doing? But I realized a few hours ago 
than swgi is probably a better choice.


I have yet to make it work, I may ask for more help once I sort it out 
(currently apache itself does not start :))/


(by the way, happy to see Lyx is still doing well. I had a lot of good 
time with it in a previous job ;-)).


It is going slowly, but we're still here!

Best,
Jean-Marc

--
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/a2d9a1a7-e271-4e93-8abd-26f7a047d502%40free.fr.


Re: [Trac] Help setting up Trac 1.6

2024-03-04 Thread phep

Hi,

Le 04/03/2024 à 17:20, Jean-Marc Lasgouttes a écrit :
[Mon Mar 04 14:49:52.948910 2024] [:error] [pid 7673] [client 
128.93.65.20:45406] PythonHandler trac.web.modpython_frontend: 
ValueError: failed to parse CPython sys.version: '3.12.2'


This reminds me of this Debian bug 
. This is the 
kind of problem that moved us away from mod_python a dozen years ago.


Is there any particular reason to stick with mod_python instead of, say, 
mod_wsgi ?


(by the way, happy to see Lyx is still doing well. I had a lot of good 
time with it in a previous job ;-)).


HTH,

phep

--
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/3e495cc5-b6fe-4be7-a3ba-15b3812cf7b1%40wakzo.net.


Re: [Trac] Help with Trac Email Notifications

2023-09-13 Thread Jun Omae
According to https://trac-hacks.org/ticket/13312#comment:16 , the issue is
fixed since 0.5.1dev. If you're using 0.5.0, it is not fixed. So try trunk.


On Thu, Sep 14, 2023 at 3:25 'Patty Cottrill' via Trac Users <
trac-users@googlegroups.com> wrote:

> Thank you for the quick response.
>
> Can I please get some clarification.
>
> The plugins wikipage shows the stable version 18549 is in the tags
> directory.
> I downloaded and installed this plugin and I am still getting the same
> behavior.
>
> https://trac-hacks.org/wiki/AccountManagerPlugin
>
> Your link is pointing to the trunk, which is considered a development
> version.
> If I understand you correctly, I need to install this development version
> to correct this problem.
>
> Please advise.
>
> Best,
> Patty Cottrill
>
>

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/CAEVLMaitv4Ot7aiBtgJDtx4AJjDS-9xqbRWuRYQ-ZKkYVQr%3DnA%40mail.gmail.com.


RE: [Trac] Help with Trac Email Notifications

2023-09-13 Thread 'Patty Cottrill' via Trac Users
Thank you for the quick response.

Can I please get some clarification.

The plugins wikipage shows the stable version 18549 is in the tags directory.
I downloaded and installed this plugin and I am still getting the same behavior.

https://trac-hacks.org/wiki/AccountManagerPlugin

Your link is pointing to the trunk, which is considered a development version.
If I understand you correctly, I need to install this development version to 
correct this problem.

Please advise.

Best,
Patty Cottrill

-Original Message-
From: trac-users@googlegroups.com  On Behalf Of 
Jun Omae
Sent: Tuesday, September 12, 2023 8:04 PM
To: trac-users@googlegroups.com
Subject: Re: [Trac] Help with Trac Email Notifications

*** CAUTION: This email originated outside of IMCI Technologies. Do NOT 
respond, take any action, click on any links or open any attachments unless you 
recognize the sender and trust the content is safe. ***


On Wed, Sep 13, 2023 at 5:56 AM 'Patty Cottrill' via Trac Users
 wrote:
>
> I recently configured password recovery.
> It is working fine, except that the email containing the temporary password 
> is not only being sent to the user, but it also includes the recipients 
> configured in the always_cc setting under notifications in trac.ini.
> Because of the security nature of the email, I never thought the password 
> reset email would include the cc recipients.
> Is there anyway to prevent the password reset email from including the 
> always_cc recipients?
>
> Below is our environment:
>
> Trac  1.2.3
> Genshi 0.7 (with speedups)
> mod_python 3.3.1
> Pygments 2.1
> pysqlite 2.7.0
> Python 2.7.12
> setuptools 20.7.0
> SQLite 3.11.0
> jQuery 1.11.3
> jQuery UI 1.11.4
> jQuery Timepicker 1.5.5
> Apache2 2.4.18
>
>
> Best,
> Patty Cottrill

It seems that the issue has been reported at
https://trac-hacks.org/ticket/13312 and fixed. Please try the latest
of https://trac-hacks.org/svn/accountmanagerplugin/trunk .

trac-hacks.org server shows currently "503 Service Unavailable"
however the page could be confirmed via Google web cache,
https://webcache.googleusercontent.com/search?q=cache:https%3A%2F%2Ftrac-hacks.org%2Fticket%2F13312
.


--
Jun Omae  (大前 潤)

--
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/CAEVLMahiE9uUtpDWz9CvuU3JeWGM17RgDMafy3CVmHN-XsaKUw%40mail.gmail.com.
*** CONFIDENTIALITY NOTICE: This email and any attachments from IMCI 
Technologies are for the sole use of the intended recipient and may contain 
material that is proprietary, confidential, privileged or otherwise legally 
protected or restricted under applicable government laws. Any review, 
disclosure, distributing or other use without expressed permission of the 
sender is strictly prohibited. If you are not the intended recipient, please 
contact the sender and delete all copies without reading, printing, or saving. 
***

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/MN2PR15MB3168C50A0FF75D78E83290C8C2F0A%40MN2PR15MB3168.namprd15.prod.outlook.com.


Re: [Trac] Help with Trac Email Notifications

2023-09-12 Thread Jun Omae
On Wed, Sep 13, 2023 at 5:56 AM 'Patty Cottrill' via Trac Users
 wrote:
>
> I recently configured password recovery.
> It is working fine, except that the email containing the temporary password 
> is not only being sent to the user, but it also includes the recipients 
> configured in the always_cc setting under notifications in trac.ini.
> Because of the security nature of the email, I never thought the password 
> reset email would include the cc recipients.
> Is there anyway to prevent the password reset email from including the 
> always_cc recipients?
>
> Below is our environment:
>
> Trac  1.2.3
> Genshi 0.7 (with speedups)
> mod_python 3.3.1
> Pygments 2.1
> pysqlite 2.7.0
> Python 2.7.12
> setuptools 20.7.0
> SQLite 3.11.0
> jQuery 1.11.3
> jQuery UI 1.11.4
> jQuery Timepicker 1.5.5
> Apache2 2.4.18
>
>
> Best,
> Patty Cottrill

It seems that the issue has been reported at
https://trac-hacks.org/ticket/13312 and fixed. Please try the latest
of https://trac-hacks.org/svn/accountmanagerplugin/trunk .

trac-hacks.org server shows currently "503 Service Unavailable"
however the page could be confirmed via Google web cache,
https://webcache.googleusercontent.com/search?q=cache:https%3A%2F%2Ftrac-hacks.org%2Fticket%2F13312
.


-- 
Jun Omae  (大前 潤)

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/CAEVLMahiE9uUtpDWz9CvuU3JeWGM17RgDMafy3CVmHN-XsaKUw%40mail.gmail.com.


RE: [Trac] Help with TracQuery

2023-05-17 Thread Patty Cottrill
Thank you.
I was afraid you were going to tell me that.

I was hoping for a workaround in the current version.

Best,
Patty Cottrill

-Original Message-
From: trac-users@googlegroups.com  On Behalf Of 
Jun Omae
Sent: Tuesday, May 16, 2023 8:41 PM
To: trac-users@googlegroups.com
Subject: Re: [Trac] Help with TracQuery

*** CAUTION: This email originated outside of IMCI Technologies. Do NOT 
respond, take any action, click on any links or open any attachments unless you 
recognize the sender and trust the content is safe. ***


On Wed, May 17, 2023 at 9:34 AM Patty Cottrill  wrote:
>
> I need help figuring out why my TracQuery is failing with the following error:
> Trac detected an internal error:
> OperationalError: ambiguous column name: id
>
> This is only occurring when I use a custom field in the query.
> I have two custom fields:
>
> referring_to
>
> No problem using this field in TracQuery
>
> Hostname
>
> Problem using this field in TracQuery
>
>
> These are my steps:
>
> Click on New Custom Query
> Select filters
> Select columns
>
> E.g. Summary, Status, Component, Created, Hostname, Referring to
>
> Click on Update
> The report displays with all the data selected, including the column for 
> Hostname
> Click on Save query
>
> This is when I get the error reported and I am not able to save query
> If I remove col=hostname, I can save successfully
>
>
>
> This is the query that is created when I click on Save query:
>
> query:?owner=pcottrill
> &
> col=id
> &
> col=summary
> &
> col=status
> &
> col=component
> &
> col=time
> &
> col=hostname
> &
> col=referring_to
> &
> order=priority
>
> Below is the environment:
>
> Trac  1.2.3
> Genshi 0.7 (with speedups)
> mod_python 3.3.1
> Pygments 2.1
> pysqlite 2.7.0
> Python 2.7.12
> setuptools 20.7.0
> SQLite 3.11.0
> jQuery 1.11.3
> jQuery UI 1.11.4
> jQuery Timepicker 1.5.5
> Apache2 2.4.18
>
>
> I am able to successfully create SQL queries using both custom fields with 
> the LEFT JOIN statement, but I should also be able to use TracQuery.
> Can you please help me figure out why this particular custom field is causing 
> this error with TracQuery.
> Again, the query itself works, but I am not able to save it for later use, so 
> I have to create a new one every time.
>
>
> Best,
> Patty Cottrill

That has been fixed in Trac 1.2.4 [1].
Please upgrade to Trac 1.2.6 (at least 1.2.4).

[1] https://trac.edgewall.org/ticket/13068

--
Jun Omae  (大前 潤)

--
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/CAEVLMag0DaOkWfG7%2BkUyLS5dsvRAO7r1Tt538D2cP%2B4%2BByEnow%40mail.gmail.com.
*** CONFIDENTIALITY NOTICE: This email and any attachments from IMCI 
Technologies are for the sole use of the intended recipient and may contain 
material that is proprietary, confidential, privileged or otherwise legally 
protected or restricted under applicable government laws. Any review, 
disclosure, distributing or other use without expressed permission of the 
sender is strictly prohibited. If you are not the intended recipient, please 
contact the sender and delete all copies without reading, printing, or saving. 
***

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/MN2PR15MB3168FCFD6EBC7FAD1E35E2DCC27E9%40MN2PR15MB3168.namprd15.prod.outlook.com.


Re: [Trac] Help with TracQuery

2023-05-16 Thread Jun Omae
On Wed, May 17, 2023 at 9:34 AM Patty Cottrill  wrote:
>
> I need help figuring out why my TracQuery is failing with the following error:
> Trac detected an internal error:
> OperationalError: ambiguous column name: id
>
> This is only occurring when I use a custom field in the query.
> I have two custom fields:
>
> referring_to
>
> No problem using this field in TracQuery
>
> Hostname
>
> Problem using this field in TracQuery
>
>
> These are my steps:
>
> Click on New Custom Query
> Select filters
> Select columns
>
> E.g. Summary, Status, Component, Created, Hostname, Referring to
>
> Click on Update
> The report displays with all the data selected, including the column for 
> Hostname
> Click on Save query
>
> This is when I get the error reported and I am not able to save query
> If I remove col=hostname, I can save successfully
>
>
>
> This is the query that is created when I click on Save query:
>
> query:?owner=pcottrill
> &
> col=id
> &
> col=summary
> &
> col=status
> &
> col=component
> &
> col=time
> &
> col=hostname
> &
> col=referring_to
> &
> order=priority
>
> Below is the environment:
>
> Trac  1.2.3
> Genshi 0.7 (with speedups)
> mod_python 3.3.1
> Pygments 2.1
> pysqlite 2.7.0
> Python 2.7.12
> setuptools 20.7.0
> SQLite 3.11.0
> jQuery 1.11.3
> jQuery UI 1.11.4
> jQuery Timepicker 1.5.5
> Apache2 2.4.18
>
>
> I am able to successfully create SQL queries using both custom fields with 
> the LEFT JOIN statement, but I should also be able to use TracQuery.
> Can you please help me figure out why this particular custom field is causing 
> this error with TracQuery.
> Again, the query itself works, but I am not able to save it for later use, so 
> I have to create a new one every time.
>
>
> Best,
> Patty Cottrill

That has been fixed in Trac 1.2.4 [1].
Please upgrade to Trac 1.2.6 (at least 1.2.4).

[1] https://trac.edgewall.org/ticket/13068

-- 
Jun Omae  (大前 潤)

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/CAEVLMag0DaOkWfG7%2BkUyLS5dsvRAO7r1Tt538D2cP%2B4%2BByEnow%40mail.gmail.com.


RE: [Trac] Help with plugins

2019-04-23 Thread Patty Cottrill
Hi Ryan,

I gave each project a PythonInterpreter with a unique name.
This seems to be working; each project is now pointing to its own plugin 
directory.

-- Patty

From: trac-users@googlegroups.com  On Behalf Of 
RjOllos
Sent: Tuesday, April 23, 2019 2:50 PM
To: Trac Users 
Subject: Re: [Trac] Help with plugins



On Monday, April 8, 2019 at 8:53:37 AM UTC-7, RjOllos wrote:


On Monday, April 8, 2019 at 11:04:23 AM UTC-4, pcottrill wrote:
Ryan,

Thanks for your response.

We actually do us a virtualhost configuration, with each project having its own 
location.
We also have an alias for htdocs/common and htdoc/shared, but plugins are not 
included in that configuration.

Below is an example of the virtualhost configuration.
I was not sure about the TracEnvParentDir configuration; would that make a 
difference in what we are experiencing?


   SetHandler mod_python
   PythonInterpreter main_interpreter
   PythonHandler trac.web.modpython_frontend
   PythonOption TracEnv /home/trac/project_a
   PythonOption TracEnvParentDir /home/trac
   PythonOption TracUriRoot /project_a
   PythonOption TracLocale en_US.UTF8
   PythonOption PYTHON_EGG_CACHE /home/trac/python_egg_cache
   Order allow,deny
   Allow from all


  AuthType Basic
  AuthName "New Trac Project"
  AuthUserFile /home/trac.htpasswd
 # Require valid-user


-- Patty

You'll want to remove "PythonOption TracEnvParentDir /home/trac" for a 
configuration block that just serves a single project. Setting TracEnv is 
sufficient. I don't think that change will fix your plugin loading issue, but 
give it a check after making that change just in case.

I don't have much experience with mod_python, so maybe someone else will chime 
in here.

What is your mod_python version? This option looks applicable to your situation:
http://modpython.org/live/current/doc-html/directives.html#pythoninterpperdirective
It looks like that option should be specified at server config scope, i.e. 
outside the Location directive, and then remove "PythonInterpreter 
main_interpreter" within your Location directives.

Or, it might be sufficient to just give a unique name to each PythonInterpreter 
directive. Such as:

PythonInterpreter project_a

See also: 
http://modpython.org/live/current/doc-html/pythonapi.html#pyapi-interps

I don't know the history behind using "PythonInterpreter main_interpreter" in 
the configuration samples on the ModPython page, and whether that is entirely 
due to the issue described here:
https://trac.edgewall.org/wiki/TracModPython#Subversionissues

After making any changes to the python interpreter configuration, we'll need to 
be on the lookout for any undesirable behavior.

- Ryan

Did you get it working? If so, which change did you make?

- Ryan
--
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
trac-users+unsubscr...@googlegroups.com<mailto:trac-users+unsubscr...@googlegroups.com>.
To post to this group, send email to 
trac-users@googlegroups.com<mailto:trac-users@googlegroups.com>.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] Help with plugins

2019-04-23 Thread RjOllos


On Monday, April 8, 2019 at 8:53:37 AM UTC-7, RjOllos wrote:
>
>
>
> On Monday, April 8, 2019 at 11:04:23 AM UTC-4, pcottrill wrote:
>>
>> Ryan,
>>
>>  
>>
>> Thanks for your response.
>>
>>  
>>
>> We actually do us a virtualhost configuration, with each project having 
>> its own location.
>>
>> We also have an alias for htdocs/common and htdoc/shared, but plugins are 
>> not included in that configuration. 
>>
>>  
>>
>> Below is an example of the virtualhost configuration.
>>
>> I was not sure about the TracEnvParentDir configuration; would that make 
>> a difference in what we are experiencing?
>>
>>  
>>
>> 
>>
>>SetHandler mod_python
>>
>>PythonInterpreter main_interpreter
>>
>>PythonHandler trac.web.modpython_frontend
>>
>>PythonOption TracEnv /home/trac/project_a
>>
>>PythonOption TracEnvParentDir /home/trac
>>
>>PythonOption TracUriRoot /project_a
>>
>>PythonOption TracLocale en_US.UTF8
>>
>>PythonOption PYTHON_EGG_CACHE /home/trac/python_egg_cache
>>
>>Order allow,deny
>>
>>Allow from all
>>
>> 
>>
>> 
>>
>>   AuthType Basic
>>
>>   AuthName "New Trac Project"
>>
>>   AuthUserFile /home/trac.htpasswd
>>
>>  # Require valid-user
>>
>> 
>>
>>  
>>
>> -- Patty
>>
>
> You'll want to remove "PythonOption TracEnvParentDir /home/trac" for a 
> configuration block that just serves a single project. Setting TracEnv is 
> sufficient. I don't think that change will fix your plugin loading issue, 
> but give it a check after making that change just in case.
>
> I don't have much experience with mod_python, so maybe someone else will 
> chime in here.
>
> What is your mod_python version? This option looks applicable to your 
> situation:
>
> http://modpython.org/live/current/doc-html/directives.html#pythoninterpperdirective
> It looks like that option should be specified at server config scope, i.e. 
> outside the Location directive, and then remove "PythonInterpreter 
> main_interpreter" within your Location directives.
>
> Or, it might be sufficient to just give a unique name to each 
> PythonInterpreter directive. Such as:
>
> PythonInterpreter project_a
>
> See also: 
> http://modpython.org/live/current/doc-html/pythonapi.html#pyapi-interps
>
> I don't know the history behind using "PythonInterpreter main_interpreter" 
> in the configuration samples on the ModPython page, and whether that is 
> entirely due to the issue described here:
> https://trac.edgewall.org/wiki/TracModPython#Subversionissues
>
> After making any changes to the python interpreter configuration, we'll 
> need to be on the lookout for any undesirable behavior.
>
> - Ryan
>

Did you get it working? If so, which change did you make?

- Ryan 

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] Help with plugins

2019-04-08 Thread RjOllos


On Monday, April 8, 2019 at 11:04:23 AM UTC-4, pcottrill wrote:
>
> Ryan,
>
>  
>
> Thanks for your response.
>
>  
>
> We actually do us a virtualhost configuration, with each project having 
> its own location.
>
> We also have an alias for htdocs/common and htdoc/shared, but plugins are 
> not included in that configuration. 
>
>  
>
> Below is an example of the virtualhost configuration.
>
> I was not sure about the TracEnvParentDir configuration; would that make a 
> difference in what we are experiencing?
>
>  
>
> 
>
>SetHandler mod_python
>
>PythonInterpreter main_interpreter
>
>PythonHandler trac.web.modpython_frontend
>
>PythonOption TracEnv /home/trac/project_a
>
>PythonOption TracEnvParentDir /home/trac
>
>PythonOption TracUriRoot /project_a
>
>PythonOption TracLocale en_US.UTF8
>
>PythonOption PYTHON_EGG_CACHE /home/trac/python_egg_cache
>
>Order allow,deny
>
>Allow from all
>
> 
>
> 
>
>   AuthType Basic
>
>   AuthName "New Trac Project"
>
>   AuthUserFile /home/trac.htpasswd
>
>  # Require valid-user
>
> 
>
>  
>
> -- Patty
>

You'll want to remove "PythonOption TracEnvParentDir /home/trac" for a 
configuration block that just serves a single project. Setting TracEnv is 
sufficient. I don't think that change will fix your plugin loading issue, 
but give it a check after making that change just in case.

I don't have much experience with mod_python, so maybe someone else will 
chime in here.

What is your mod_python version? This option looks applicable to your 
situation:
http://modpython.org/live/current/doc-html/directives.html#pythoninterpperdirective
It looks like that option should be specified at server config scope, i.e. 
outside the Location directive, and then remove "PythonInterpreter 
main_interpreter" within your Location directives.

Or, it might be sufficient to just give a unique name to each 
PythonInterpreter directive. Such as:

PythonInterpreter project_a

See also: 
http://modpython.org/live/current/doc-html/pythonapi.html#pyapi-interps

I don't know the history behind using "PythonInterpreter main_interpreter" 
in the configuration samples on the ModPython page, and whether that is 
entirely due to the issue described here:
https://trac.edgewall.org/wiki/TracModPython#Subversionissues

After making any changes to the python interpreter configuration, we'll 
need to be on the lookout for any undesirable behavior.

- Ryan

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


RE: [Trac] Help with plugins

2019-04-08 Thread Patty Cottrill
Ryan,

Thanks for your response.

We actually do us a virtualhost configuration, with each project having its own 
location.
We also have an alias for htdocs/common and htdoc/shared, but plugins are not 
included in that configuration.

Below is an example of the virtualhost configuration.
I was not sure about the TracEnvParentDir configuration; would that make a 
difference in what we are experiencing?


   SetHandler mod_python
   PythonInterpreter main_interpreter
   PythonHandler trac.web.modpython_frontend
   PythonOption TracEnv /home/trac/project_a
   PythonOption TracEnvParentDir /home/trac
   PythonOption TracUriRoot /project_a
   PythonOption TracLocale en_US.UTF8
   PythonOption PYTHON_EGG_CACHE /home/trac/python_egg_cache
   Order allow,deny
   Allow from all


  AuthType Basic
  AuthName "New Trac Project"
  AuthUserFile /home/trac.htpasswd
 # Require valid-user


-- Patty

From: trac-users@googlegroups.com  On Behalf Of 
RjOllos
Sent: Saturday, April 6, 2019 7:14 AM
To: Trac Users 
Subject: Re: [Trac] Help with plugins



On Friday, April 5, 2019 at 5:16:41 PM UTC-4, pcottrill wrote:
Thanks for the quick reply.
We are actually using apache with mod_python.
Does that make a difference in your response?

-- Patty

The idea is the same. If you have all Trac sites running under same Python 
interpreter instance, plugins will be shared. I think you could use either a 
different VirtualHost directive for each environment, or maybe even just a 
different Location directive:
https://trac.edgewall.org/wiki/TracModPython#VirtualHostConfiguration
I would try to add a different configuration section for each Trac site, i.e. 
 ...

- Ryan
--
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
trac-users+unsubscr...@googlegroups.com<mailto:trac-users+unsubscr...@googlegroups.com>.
To post to this group, send email to 
trac-users@googlegroups.com<mailto:trac-users@googlegroups.com>.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] Help with plugins

2019-04-06 Thread RjOllos


On Friday, April 5, 2019 at 5:16:41 PM UTC-4, pcottrill wrote:
>
> Thanks for the quick reply.
>
> We are actually using apache with mod_python.
>
> Does that make a difference in your response?
>
>  
>
> -- Patty
>

The idea is the same. If you have all Trac sites running under same Python 
interpreter instance, plugins will be shared. I think you could use either 
a different VirtualHost directive for each environment, or maybe even just 
a different Location directive:
https://trac.edgewall.org/wiki/TracModPython#VirtualHostConfiguration
I would try to add a different configuration section for each Trac site, 
i.e.  ...

- Ryan 

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


RE: [Trac] Help with plugins

2019-04-05 Thread Patty Cottrill
Thanks for the quick reply.
We are actually using apache with mod_python.
Does that make a difference in your response?

-- Patty

From: trac-users@googlegroups.com  On Behalf Of 
Ryan Ollos
Sent: Friday, April 5, 2019 5:00 PM
To: Trac Users 
Subject: Re: [Trac] Help with plugins



On Fri, Apr 5, 2019 at 4:22 PM Patty Cottrill 
mailto:pcottr...@imci.net>> wrote:
Can someone please explain this strange behavior with plugins.

We are running Trac 1.2.3 on Ubuntu 16.04.

I installed the account manager plugin in a single project by placing the .egg 
in the project’s plugin directory as per instructions below For a single 
project:
https://trac.edgewall.org/wiki/TracPlugins

Let’s say I have the following project:
Project_a – placed TracAccountManager-0.5.0-py2.7.egg in this project’s plugin 
directory only
Project_b
Project_c

I expected this plugin to only be available to Project_a, but it is being 
inherited by all other projects.

The “About Trac” page of the other projects lists the plugins I installed for 
all projects under /usr/local/lib/python2.7/dist-packages, which I expect to 
see.
What seems weird though, is that it also lists the plugin I installed for 
Project_a (/home/trac/Project_a/plugins/ TracAccountManager-0.5.0-py2.7.egg)
The plugin is disabled, but it does allow me to enable it.

Did I do something wrong?
I do not use a global trac.ini, nor do I configure the other projects to 
inherit from /home/trac/Project_a/plugins.

Please advise.

Thanks
-- Patty

Hi Patty, You did nothing wrong. The plugins that are loaded in the process 
will be available for all Trac projects running under the same instance of 
tracd. There are more details here:
https://trac.edgewall.org/wiki/TracPlugins#Isthewrongversionofthepluginloading

If you wish to isolate the projects and have different plugins for each, you'll 
need to run multiple instances of tracd, one for each Trac project.

- Ryan
--
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
trac-users+unsubscr...@googlegroups.com<mailto:trac-users+unsubscr...@googlegroups.com>.
To post to this group, send email to 
trac-users@googlegroups.com<mailto:trac-users@googlegroups.com>.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] Help with plugins

2019-04-05 Thread Ryan Ollos
On Fri, Apr 5, 2019 at 4:22 PM Patty Cottrill  wrote:

> Can someone please explain this strange behavior with plugins.
>
> We are running Trac 1.2.3 on Ubuntu 16.04.
>
> I installed the account manager plugin in a single project by placing the
> .egg in the project’s plugin directory as per instructions below *For a
> single project*:
> *https://trac.edgewall.org/wiki/TracPlugins*
> 
>
> Let’s say I have the following project:
> Project_a – placed TracAccountManager-0.5.0-py2.7.egg in this project’s
> plugin directory only
> Project_b
> Project_c
>
> I expected this plugin to only be available to Project_a, but it is being
> inherited by all other projects.
>
> The “About Trac” page of the other projects lists the plugins I installed
> for all projects under /usr/local/lib/python2.7/dist-packages, which I
> expect to see.
> What seems weird though, is that it also lists the plugin I installed for
> Project_a (/home/trac/Project_a/plugins/ TracAccountManager-0.5.0-py2.7.egg)
> The plugin is disabled, but it does allow me to enable it.
>
> Did I do something wrong?
> I do not use a global trac.ini, nor do I configure the other projects to
> inherit from /home/trac/Project_a/plugins.
>
> Please advise.
>
> Thanks
> -- Patty
>

Hi Patty, You did nothing wrong. The plugins that are loaded in the process
will be available for all Trac projects running under the same instance of
tracd. There are more details here:
https://trac.edgewall.org/wiki/TracPlugins#Isthewrongversionofthepluginloading

If you wish to isolate the projects and have different plugins for each,
you'll need to run multiple instances of tracd, one for each Trac project.

- Ryan

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] Help Applying Trac Patch

2018-09-05 Thread Ryan Ollos
On Wed, Sep 5, 2018 at 1:00 PM Michael Beaumont  wrote:

> Hi,
>
> The issue noted in ticket https://trac.edgewall.org/ticket/13068 is
> greatly impacting required reporting for my project.
>
> I see there is a patch for the query.py file noted here:
> https://trac.edgewall.org/changeset/26786c23f/jomae.git
>
> Is there a way to apply this patch without waiting for a new Trac release?
>
> Can i just edit the file here C:\Python27\Lib\site-packages\trac and
> restart Trac?  Or do i have to issue some python command to recompile trac?
>
> Thanks,
> Michael
>

I would do the following:
1. Download the source for your Trac release and apply the patch
2. Stop tracd or your web server
3. Uninstall Trac
> C:\Python27\Scripts\pip.exe uninstall Trac
4. Navigate to the src directory
> C:\Python27\python.exe setup.py bdist_wheel
> C:\Python27\Scripts\pip.exe install dist\*.whl

Or roll back to the previous Trac release.

We should have a new release shortly.

- Ryan

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] Help in development of trac macro building links

2017-08-09 Thread RjOllos


On Tuesday, August 8, 2017 at 10:20:57 PM UTC-7, Peter Suter wrote:
>
> On 09.08.2017 00:25, RjOllos wrote: 
> > 
> > On Tuesday, August 8, 2017 at 11:14:25 AM UTC-7, Peter Suter wrote: 
> > 
> > A slightly simpler version: 
> > 
> > return format_to_html(self.env, formatter.context, the_link) 
> > 
> > 
> > Seems like it would be a good idea to change the example code to use 
> > format_to_html, as in your example: 
> > https://trac.edgewall.org/wiki/WikiMacros#Macrowitharguments 
> > 
> > , unless the example is intended to be illustrative of something. 
> > 
> > Using format_to_html is effectively the same after two levels of 
> > indirection: 
> > 
> https://trac.edgewall.org/browser/tags/trac-1.2.2/trac/wiki/formatter.py?marks=1606#L1601
>  
> > 
> https://trac.edgewall.org/browser/tags/trac-1.2.2/trac/wiki/formatter.py?marks=1559-1562#L1541
>  
> > 
> > What do you think? 
>
> Yes, I thought the same thing, but I also wasn't sure if it was intended 
> to illustrate something more general. 
>
>
> Peter 
>

Thanks, I edited the example:
https://trac.edgewall.org/wiki/WikiMacros?version=52

- Ryan
 

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] Help in development of trac macro building links

2017-08-08 Thread Peter Suter

On 09.08.2017 00:25, RjOllos wrote:


On Tuesday, August 8, 2017 at 11:14:25 AM UTC-7, Peter Suter wrote:

A slightly simpler version:

return format_to_html(self.env, formatter.context, the_link)


Seems like it would be a good idea to change the example code to use 
format_to_html, as in your example:

https://trac.edgewall.org/wiki/WikiMacros#Macrowitharguments

, unless the example is intended to be illustrative of something.

Using format_to_html is effectively the same after two levels of 
indirection:

https://trac.edgewall.org/browser/tags/trac-1.2.2/trac/wiki/formatter.py?marks=1606#L1601
https://trac.edgewall.org/browser/tags/trac-1.2.2/trac/wiki/formatter.py?marks=1559-1562#L1541

What do you think?


Yes, I thought the same thing, but I also wasn't sure if it was intended 
to illustrate something more general.



Peter

--
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] Help in development of trac macro building links

2017-08-08 Thread RjOllos


On Tuesday, August 8, 2017 at 11:14:25 AM UTC-7, Peter Suter wrote:
>
> A slightly simpler version:
>
> from trac.wiki.macros import WikiMacroBase
> from trac.wiki.formatter import format_to_html
>
>
> class MyLinkMacro(WikiMacroBase):
> def expand_macro(self, formatter, name, text, args):
> the_link = 
> '[myschema://myserver:1234/this/that/page?param1=value1¶m2=value2¶m3='
>  
> + text + '¶m4=value4 ' + text + ']'
>
> return format_to_html(self.env, formatter.context, 
> the_link)
>

Seems like it would be a good idea to change the example code to use 
format_to_html, as in your example:
https://trac.edgewall.org/wiki/WikiMacros#Macrowitharguments

, unless the example is intended to be illustrative of something. 

Using format_to_html is effectively the same after two levels of 
indirection:
https://trac.edgewall.org/browser/tags/trac-1.2.2/trac/wiki/formatter.py?marks=1606#L1601
https://trac.edgewall.org/browser/tags/trac-1.2.2/trac/wiki/formatter.py?marks=1559-1562#L1541

What do you think?

- Ryan
 

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] Help in development of trac macro building links

2017-08-08 Thread Peter Suter

Hi,

On 08.08.2017 14:19, Riedel, Torge wrote:


Hi,

I’m developing a trac macro to make it easier for wiki editors to add 
links to an external tool.


In Wiki-Markup they can then use a macro:

[[MyLink(my_value)]]

to have a link in trac style on their wiki page to the external tool.

The format of the link is similar to this:

myschema://myserver:1234/this/that/page?param1=value1¶m2=value2¶m3=my_value¶m4=value4



Have you considered using Trac's InterWiki feature?
https://trac.edgewall.org/wiki/InterWiki

For example you could edit own InterMapTxt wiki page, adding something like:

mylinkmyschema://myserver:1234/this/that/page?param1=value1¶m2=value2¶m3=$1¶m4=$2 



and then write

mylink:value3:value4

to get a  link. If that's all you want then no plugin is needed.

My py code (I’m not a python developer, but developing C/C++. Google 
helps me with python) looks like this in the macro file (I modified 
the example from here https://trac.edgewall.org/wiki/0.12/WikiMacros):


from genshi.core import Markup

from trac.wiki.macros import WikiMacroBase

from trac.wiki import Formatter

import StringIO

class MyLinkMacro(WikiMacroBase):

def expand_macro(self, formatter, name, text, args):

the_link = 
'[myschema://myserver:1234/this/that/page?param1=value1¶m2=value2¶m3=' 
+ text + '¶m4=value4 ' + text + ']'


# Convert Wiki markup to HTML, new style

out = StringIO.StringIO()

Formatter(self.env, formatter.context).format(the_link, out)

return Markup(out.getvalue())

My problem is, that the link is rendered but does not work afterwards 
because „&“ is replaced by „&“ and without any deeper knowledge of 
python and trac development I’m blocked in progress.


The code above actually seems to work (if "myschema " is replace by a 
known schema like "http").


A slightly simpler version:

from trac.wiki.macros import WikiMacroBase
from trac.wiki.formatter import format_to_html


class MyLinkMacro(WikiMacroBase):
def expand_macro(self, formatter, name, text, args):
the_link = 
'[myschema://myserver:1234/this/that/page?param1=value1¶m2=value2¶m3=' 
+ text + '¶m4=value4 ' + text + ']'


return format_to_html(self.env, formatter.context, the_link)


--
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] Help with mod_wsgi + multiple projects

2014-02-16 Thread Clint Dilks
For anyone following this thread I thought I wound summarize the config
that is working

Outside of any virtualhost
WSGIPythonEggs /var/www/pyeggs
WSGISocketPrefix /var/run/wsgi  (I needed this because I am running CentOS
with SE Linux enabled)


ServerAdmin
DocumentRoot
ServerName
ErrorLog
CustomLog


   WSGIDaemonProcess flax user=apache group=apache threads=25
   WSGIScriptAlias /flax /var/www/trac/projects/flax/cgi-bin/trac.wsgi

   
 WSGIProcessGroup flax
 WSGIApplicationGroup %{GLOBAL}
 Order deny,allow
 Allow from all
   

   WSGIDaemonProcess greenstone.org user=apache group=apache threads=25
   WSGIScriptAlias /greenstone.org /var/www/trac/projects/
greenstone.org/cgi-bin/trac.wsgi

   
 WSGIProcessGroup greenstone.org
 WSGIApplicationGroup %{GLOBAL}
 Order deny,allow
 Allow from all
   

   WSGIDaemonProcess greenstone user=apache group=apache threads=25
   WSGIScriptAlias / /var/www/trac/projects/greenstone/cgi-bin/trac.wsgi

   
 WSGIProcessGroup greenstone
 WSGIApplicationGroup %{GLOBAL}
 Order deny,allow
 Allow from all
   

   
  AuthType Basic
  AuthName "Greenstone Developers"
  # Require valid-user
  Require group {my group}
   

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at http://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Trac] Help with mod_wsgi + multiple projects

2014-02-16 Thread Clint Dilks
Hi Mark, thanks for the response.


> Sounds like a good idea.  First of all, have you read all of Graham's
> excellent Trac documentation on the mod_wsgi website?
>
> https://code.google.com/p/modwsgi/wiki/IntegrationWithTrac
>
>
I had seen it, but was following the stuff I found on TracInstall /
TracUpgrade first.
Working through it now.



>
>
> I am not sure of what exactly is wrong with your configuration but my
> guess would be that your first `WSGIScriptAlias` always matches and "hides"
> the others...
>
> ~ mark c
>
>
This was it exactly.  Thanks for the pointer, on a Friday Afternoon I
didn't even consider order being important. :)

Now to see if I can get the WSGIDaemonProcess stuff working.

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at http://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/groups/opt_out.


RE: [Trac] Help with mod_wsgi + multiple projects

2014-02-14 Thread Cooke, Mark
> -Original Message-
> From: trac-users@googlegroups.com [mailto:trac-users@googlegroups.com] On
> Behalf Of Clint Dilks
> 
> Hi,
> 
> I am trying to migrate an existing installation to a new system.
> Previous we were using mod_python, but I am trying to get things 
> working with mod_wsgi.

Sounds like a good idea.  First of all, have you read all of Graham's excellent 
Trac documentation on the mod_wsgi website?

https://code.google.com/p/modwsgi/wiki/IntegrationWithTrac

> If I have a single project things seem to be working as I would expect.
> 
> But if I add a second project I can't access it.  From looking at the
> archives I have just realized my approach with the current config isn't the
> best one but I believe it should at least work.
> I can access the main repository at / but if I go to /flax I see No handler
> matched request to /flax
> 
> I would like to understand what I am doing wrong with the current config
> before modify it to use a single cgi script.  configtest is okay and nothing
> is reported in the error log.
> 
> Thanks for any help you can offer :)
> 
> 
> ServerAdmin 
> DocumentRoot /var/www/html
> ServerName trac.migr.greenstone.org
> ErrorLog logs/trac.greenstone.org-error_log
> CustomLog logs/trac.greenstone.org-access_log common
> 
> 
>
>   Options Indexes FollowSymLinks
>   AllowOverride None
>   Allow from all
>
> 
>
>  Order allow,deny
>  Allow from all
>
> 
> 
>
>   WSGIApplicationGroup %{GLOBAL}
>   Order deny,allow
>   Allow from all
>
> 
>
>   AuthType Basic
>   AuthName "Greenstone Developers"
>   # Require valid-user
>   Require group
>
> 
>WSGIScriptAlias / /var/www/trac/projects/greenstone/cgi-bin/trac.wsgi
>WSGIScriptAlias /flax/ /var/www/trac/projects/flax/cgi-bin/trac.wsgi
>WSGIScriptAlias /greenstone.org/
> /var/www/trac/projects/greenstone.org/cgi-bin/trac.wsgi
> 
> 

I am not sure of what exactly is wrong with your configuration but my guess 
would be that your first `WSGIScriptAlias` always matches and "hides" the 
others...

~ mark c

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at http://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Trac] Help the TracNav macro isn't displaying properly

2013-03-18 Thread Thomas Moschny
2013/3/17 akliewer99 

> Would you know of a way to keep that I can keep it in but execute it
> earlier in the page process so it doesn't won't overwrite my CSS styles?


We already have a ticket for TracNav about including the CSS earlier. It
would then be loaded in the HTML header part. The downside is that at that
point when the header is constructed, it is unclear whether the macro is
used at all on the page, so we would have to include the CSS
unconditionally on every page. Anyway, I simply did not get around to
implementing this yet.

Regards,
Thomas

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at http://groups.google.com/group/trac-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Trac] Help the TracNav macro isn't displaying properly

2013-03-17 Thread RjOllos
On Saturday, March 16, 2013 10:27:51 PM UTC-7, akliewer99 wrote:

> THANK YOU VERY MUCH!  That was it!
>
> I had forgotten I did that. When I first setup this Trac environment I was 
> using custom CSS style. A dark black theme. It was being overwritten by 
> that jQuery.loadStyleSheet(...)  so I commented it out.
>
> Would you know of a way to keep that I can keep it in but execute it 
> earlier in the page process so it doesn't won't overwrite my CSS styles?
>

Are you adding your CSS as described in (1), or using the ThemeEnginePlugin 
(2) or some other way?

(1) http://trac.edgewall.org/wiki/TracInterfaceCustomization#SiteAppearance
(2) http://trac-hacks.org/wiki/ThemeEnginePlugin 

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at http://groups.google.com/group/trac-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Trac] Help the TracNav macro isn't displaying properly

2013-03-16 Thread akliewer99
THANK YOU VERY MUCH!  That was it!

I had forgotten I did that. When I first setup this Trac environment I was 
using custom CSS style. A dark black theme. It was being overwritten by 
that jQuery.loadStyleSheet(...)  so I commented it out.

Would you know of a way to keep that I can keep it in but execute it 
earlier in the page process so it doesn't won't overwrite my CSS styles?

If not, thanks anyways. This was a BIG help!
God Bless,
Arlene :)

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at http://groups.google.com/group/trac-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Trac] Help the TracNav macro isn't displaying properly

2013-03-16 Thread Thomas Moschny
Hi,

you commented out the jQuery.loadStyleSheet(...) part in the template.
TracNav however relies on that (via trac.web.chrome.add_stylesheet) to get
its CSS loaded.

Regards,
Thomas


2013/3/17 akliewer99 

> Howdy all,
>
> Got a Freshly installed instance of Trac 1.0 running with mysqldb
> connector. TracNavMacro  plugin
> is installed. When it displays on a page, in the header there are big bold
> letters  "TracNav" with a . See my 
> site!
>
> On the wiki page used to generate the TOC, I don't have any reference to
> TracNav except the [[TracNav]] at the top of the page. I have had this
> working before on Trac v12.3, but this is the first time on v1.0.
>
> Can anyone tell me what I am missing or have wrong?
>
> Thanks,
> AMK
>
> --
> You received this message because you are subscribed to the Google Groups
> "Trac Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to trac-users+unsubscr...@googlegroups.com.
> To post to this group, send email to trac-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/trac-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Thomas Moschny 

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at http://groups.google.com/group/trac-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Trac] Help to setup trac on Apache+mod_fcgid+Windows

2013-01-17 Thread Jun Omae
Hi,

Trac doesn't work with FastCGI on Windows. However, Trac works fine
with Apache 2.2 and mod_wsgi on Windows.

   Note for Windows: Trac's FastCGI does not run under Windows,
   as Windows does not implement Socket.fromfd, which is used
   by _fcgi.py. If you want to connect to IIS, you may want to
   try AJP/ISAPI.

   from http://trac.edgewall.org/wiki/TracFastCgi

And, See the following links;
  * http://trac.edgewall.org/wiki/TracOnWindows
  * http://trac.edgewall.org/wiki/TracModWSGI


On Thu, Jan 17, 2013 at 1:41 AM, clp  wrote:
>
> Hola a todos,
> Traté de configurar trac con mod_fcgid sin éxito. Siempre consiguiendo error
> (OS 109) La tubería se ha terminado. : Mod_fcgid: get error superposición
> resultado
> Final prematuro de las cabeceras de script: trac.fcgid
> Le agradecería si alguien me ayuda con los pasos a seguir para que se
> ejecute en Windows Trac + Apache + mod_fcgid.
> Quiero mod_fcgid mod_python porque ya no se recomienda.
> gracias por toda su ayuda.
> Hi all,
> I tried to setup trac with mod_fcgid without success. Always getting error
> (OS 109)The pipe has been ended. : mod_fcgid: get overlap result error
> Premature end of script headers: trac.fcgid
> I would appreciate if someone helps me with the steps to follow to have Trac
> running on Windows + Apache + mod_fcgid.
> Here is what I have at this time:
> LoadModule fcgid_module lib/modules/mod_fcgid.so
> 
> Alias /chrome/common C:/Python25/Lib/site-packages/trac/htdocs/common
> Alias /chrome/site C:/Python25/Lib/site-packages/trac/htdocs/site
> ScriptAlias /cgi-bin "C:/Python25/bin/cgi-bin"
> 
> SetHandler fcgid-script
> Options ExecCGI
> AllowOverride None
> allow from all
> 
> ScriptAlias / C:/Python25/bin/cgi-bin/trac.fcgi/
> 
>   Order allow,deny
>   Allow from all
>  
>  
>   Order allow,deny
>   Allow from all
>  
> 
>   I don't have nothing on httpd.conf. All this is in another file called
> trac-httpd.conf. In httpd.conf I include this file. I want to have in just
> one folder all my projects.
>
> thanks for all your help.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Trac Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/trac-users/-/uLUQtqR1GsgJ.
> 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.


-- 
Jun Omae  (大前 潤)

-- 
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] Help with report of tickets by a user

2012-08-29 Thread Steffen Hoffmann
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Am 29.08.2012 23:54, schrieb Steffen Hoffmann:
> Am 22.08.2012 04:33, schrieb Albert Chin:
>> Hi. I need help designing a report to show all tickets where the user
>> is the owner, reporter, or tickets they have not created but tickets
>> they have left a comment on. It's the last part that's tricky.
[...]
> This is one is a more appropriate report SQL statement, at least to show
> 
> "(current) user is owner or reporter"
[...]
> 
> About the comment, this is in another table, ticket_change. I'm just
> looking at it. Will keep you updated, if I see a way to do this too.

See http://stackoverflow.com/questions/12187847 for a possible solution,
that covers all three of your requirements:
 reporter, ticket owner (both from 'ticket') as well as
 comment author (from 'ticket_change')

and works so without multiple entries per ticket. This last aspect seems
likely the most tricky one, not the inclusion of comment authors in general.

Hope this helps.

Sincerely,

Steffen Hoffmann
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlA+pu0ACgkQ31DJeiZFuHfJvQCgjk5Zzd8twXGzIPEfRQbVIzac
aZYAni5BahJEZBaF9wHpq7pLB8gkrtMD
=HB+g
-END PGP SIGNATURE-

-- 
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] Help with report of tickets by a user

2012-08-29 Thread Steffen Hoffmann
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Am 22.08.2012 04:33, schrieb Albert Chin:
> Hi. I need help designing a report to show all tickets where the user
> is the owner, reporter, or tickets they have not created but tickets
> they have left a comment on. It's the last part that's tricky. I can
> accomplish the first two with:
>   SELECT p.value AS __color__,
>  t.milestone AS __group__,
>  id AS ticket, t.type AS type, owner, reporter,
>  time as created, changetime AS modified
> FROM ticket t, enum p
> WHERE owner = 'gary' OR reporter = 'gary'
> ORDER BY t.milestone, p.value, t.type, t.time

No, this won't work as you might expect. You'll need to JOIN tables, or
you'll end up with a lot of duplicated rows otherwise (look for
'cartesian product', if you don't understand that).

This is one is a more appropriate report SQL statement, at least to show

"(current) user is owner or reporter"

SELECT
  p.value AS __color__,
  t.milestone AS __group__,
  id AS ticket, t.type AS type, owner, reporter,
  time as created, changetime AS modified
FROM ticket t
LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority'
WHERE owner = $USER OR reporter = $USER
ORDER BY t.milestone, p.value, t.type, t.time

Note, that I replaced you hard-coded username with one of the available
variables to dynamically show results depending on logged in user,
because you might rather want that instead of one-report-per-user.

About the comment, this is in another table, ticket_change. I'm just
looking at it. Will keep you updated, if I see a way to do this too.

Sincerely,

Steffen Hoffmann
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlA+j7EACgkQ31DJeiZFuHcJkACg0T48GeonwUf9k6Sy6oet0ew3
jrsAnA+oQvOCSElJR6L9r4uUQPplzfmm
=Ofh/
-END PGP SIGNATURE-

-- 
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] Help with TracMercurial migration

2011-11-04 Thread Remy Blank
Phill wrote:
> I tried building from SVN but I get this error:

This looks like an issue with setuptools. I won't be able to help with
this, I'm afraid.

-- Remy



signature.asc
Description: OpenPGP digital signature


Re: [Trac] Help with TracMercurial migration

2011-11-04 Thread Phill
On 04/nov/2011, at 20:29, Remy Blank wrote:
> phill wrote:
>> I've migrated a Trac + Mercurial install from one server to another by
>> copying my project directory and installing the same version of Trac,
>> Mercurial and the TracMercurial plugin. Everything seems to work fine
>> except when I try to view the "Revision log" I get the error below.
> 
> This is a compatibility issue with Mercurial, and has been fixed
> already. Please update your TracMercurial plugin to the latest version
> in SVN in plugins/0.12/mercurial-plugin.
> -- Remy

Thanks - I am using the latest FreeBSD port but it seems this is out of date.

I tried building from SVN but I get this error:

# python setup.py bdist_egg
running bdist_egg
Traceback (most recent call last):
  File "setup.py", line 45, in 
**extra)
  File "/usr/local/lib/python2.7/distutils/core.py", line 152, in setup
dist.run_commands()
  File "/usr/local/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
  File "/usr/local/lib/python2.7/distutils/dist.py", line 971, in run_command
cmd_obj.ensure_finalized()
  File "/usr/local/lib/python2.7/distutils/cmd.py", line 109, in 
ensure_finalized
self.finalize_options()
  File "build/bdist.freebsd-9.0-RC1-amd64/egg/setuptools/command/bdist_egg.py", 
line 94, in finalize_options
  File "/usr/local/lib/python2.7/distutils/cmd.py", line 312, in 
get_finalized_command
cmd_obj.ensure_finalized()
  File "/usr/local/lib/python2.7/distutils/cmd.py", line 109, in 
ensure_finalized
self.finalize_options()
  File "build/bdist.freebsd-9.0-RC1-amd64/egg/setuptools/command/egg_info.py", 
line 85, in finalize_options
  File "build/bdist.freebsd-9.0-RC1-amd64/egg/setuptools/command/egg_info.py", 
line 185, in tags
  File "build/bdist.freebsd-9.0-RC1-amd64/egg/setuptools/command/egg_info.py", 
line 233, in get_svn_revision
IndexError: list index out of range

-- 
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] Help with TracMercurial migration

2011-11-04 Thread Remy Blank
phill wrote:
> I've migrated a Trac + Mercurial install from one server to another by
> copying my project directory and installing the same version of Trac,
> Mercurial and the TracMercurial plugin. Everything seems to work fine
> except when I try to view the "Revision log" I get the error below.

This is a compatibility issue with Mercurial, and has been fixed
already. Please update your TracMercurial plugin to the latest version
in SVN in plugins/0.12/mercurial-plugin.

-- Remy



signature.asc
Description: OpenPGP digital signature


Re: [Trac] Help with Trac egg

2011-10-31 Thread Jason Miller

On Oct 31, 2011, at 12:04 PM, Patty Cottrill wrote:

> Thanks for the response.
> Unfortunately, I'm not anywhere near a sw developer.
> I read the docs on creating plugins, and it requires knowledge in
> writing code, which is definitey not me.
> Can't I just unzip the .egg file in the current location? 
> 
> 
> -Patty
> 
> -Original Message-
> From: trac-users@googlegroups.com [mailto:trac-users@googlegroups.com]
> On Behalf Of Remy Blank
> Sent: Friday, October 28, 2011 1:58 AM
> To: trac-users@googlegroups.com
> Subject: Re: [Trac] Help with Trac egg
> 
> Patty Cottrill wrote:
>> I need to make this customization to the commit_updater.py, but I 
>> don't have access to it because its in the Trac .egg file.
>> The .egg file is located under /usr/local/lib/python2.6/dist-packages.
>> Because it's an .egg file and not a directory, I can't get to the 
>> commit_updater.py to edit.
>> I ran unzip -t Trac-0.12.2-py2.6.egg and I can see the file in there.
>> Any advise on how to address this issue.
> 
> You can create a single-file plugin, create a component that inherits
> from the commit updater component, and override any methods you like.
> Then, place your plugin into the "plugins" folder of your Trac
> environment.
> 
> Note that you have to keep the original commit updater disabled in this
> scenario, as your subclass will take its place.
> 
> -- Remy
> 
> -- 
> 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.
> 

Sometimes what I like to do when I need to edit an egg file is to install the 
egg in a development fashion. This is what I do for our Trac installment when I 
need to make a change:
svn co http://svn.edgewall.org/repos/trac/branches/0.12-stable 0.12dev
cd 0.12dev
sudo python setup.py develop

This will create a symbolic link to your svn repo instead of creating an egg 
(allowing you to make changes on the fly). This _may_ not be the best finalized 
method, but until you figure out exactly what you need to edit permanently, 
this is the _best_ method. Once your satisfied with your changes, do a standard 
sudo python setup.py to create the standard egg.

Good Luck!
Jason




-- 
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] Help with Trac egg

2011-10-31 Thread Patty Cottrill
Thanks for the response.
Unfortunately, I'm not anywhere near a sw developer.
I read the docs on creating plugins, and it requires knowledge in
writing code, which is definitey not me.
Can't I just unzip the .egg file in the current location? 


-Patty

-Original Message-
From: trac-users@googlegroups.com [mailto:trac-users@googlegroups.com]
On Behalf Of Remy Blank
Sent: Friday, October 28, 2011 1:58 AM
To: trac-users@googlegroups.com
Subject: Re: [Trac] Help with Trac egg

Patty Cottrill wrote:
> I need to make this customization to the commit_updater.py, but I 
> don't have access to it because its in the Trac .egg file.
> The .egg file is located under /usr/local/lib/python2.6/dist-packages.
> Because it's an .egg file and not a directory, I can't get to the 
> commit_updater.py to edit.
> I ran unzip -t Trac-0.12.2-py2.6.egg and I can see the file in there.
> Any advise on how to address this issue.

You can create a single-file plugin, create a component that inherits
from the commit updater component, and override any methods you like.
Then, place your plugin into the "plugins" folder of your Trac
environment.

Note that you have to keep the original commit updater disabled in this
scenario, as your subclass will take its place.

-- Remy

-- 
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] Help with Trac egg

2011-10-27 Thread Remy Blank
Patty Cottrill wrote:
> I need to make this customization to the commit_updater.py, but I don't
> have access to it because its in the Trac .egg file.
> The .egg file is located under /usr/local/lib/python2.6/dist-packages.
> Because it's an .egg file and not a directory, I can't get to the
> commit_updater.py to edit.
> I ran unzip -t Trac-0.12.2-py2.6.egg and I can see the file in there.
> Any advise on how to address this issue.

You can create a single-file plugin, create a component that inherits
from the commit updater component, and override any methods you like.
Then, place your plugin into the "plugins" folder of your Trac environment.

Note that you have to keep the original commit updater disabled in this
scenario, as your subclass will take its place.

-- Remy



signature.asc
Description: OpenPGP digital signature


Re: [Trac] Help needed

2011-04-20 Thread Matthew Caron

On 04/20/2011 02:12 AM, Saurav Sagar wrote:

SubversionException: ('Revision file lacks trailing newline', 160004)

Can you please suggest something for this..


I'd make sure you can check out the repository with SVN. It looks like 
this is a SVN problem, not a Trac problem. It's reporting that it can't 
access the SVN revision file because there isn't a trailing newline. One 
can theoretically add a newline, but I'm not sure that will work - it 
sounds like things are a bit corrupt.


I'd use SVN's tools to try and fix the repository. Once SVN says its 
okay, then you can try to resync.

--
Matthew Caron
Build Engineer
Sixnet | www.sixnet.com
O +1 518 877 5173 Ext. 138
F +1 518 602 9209
matt.ca...@sixnet.com

--
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] Help needed

2011-04-19 Thread Saurav Sagar
Yes I did..i tried to resync the repos folder then it worked fine for few 
moment and then it again started giving a new error as show below.
Python Traceback
Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 406, in 
dispatch_request
dispatcher.dispatch(req)
  File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 191, in 
dispatch
chosen_handler = self._pre_process_request(req, chosen_handler)
  File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 263, in 
_pre_process_request
chosen_handler = f.pre_process_request(req, chosen_handler)
  File "/usr/lib/python2.4/site-packages/trac/versioncontrol/api.py", line 73, 
in pre_process_request
self.get_repository(req.authname).sync()
  File "/usr/lib/python2.4/site-packages/trac/versioncontrol/cache.py", line 
175, in sync
for path,kind,action,bpath,brev in cset.get_changes():
  File "/usr/lib/python2.4/site-packages/trac/versioncontrol/svn_fs.py", line 
663, in get_changes
root = fs.revision_root(self.fs_ptr, self.rev, pool())
  File "/usr/lib/python2.4/site-packages/libsvn/fs.py", line 217, in 
svn_fs_revision_root
return apply(_fs.svn_fs_revision_root, args)
SubversionException: ('Revision file lacks trailing newline', 160004)

Can you please suggest something for this..

Regards,
Saurav Sagar

From: trac-users@googlegroups.com [mailto:trac-users@googlegroups.com] On 
Behalf Of Matthew Caron
Sent: Tuesday, April 19, 2011 5:59 PM
To: trac-users@googlegroups.com
Subject: Re: [Trac] Help needed


> This happened when I increased the size of the partition where the reos were 
> stored.

I presume you both increased the partition *and* the filesystem
inhabiting it.

Did you fsck the revised partition?

--
Matthew Caron
Build Engineer
Sixnet | www.sixnet.com<http://www.sixnet.com>
O +1 518 877 5173 Ext. 138
F +1 518 602 9209
matt.ca...@sixnet.com<mailto:matt.ca...@sixnet.com>

--
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<mailto:trac-users@googlegroups.com>.
To unsubscribe from this group, send email to 
trac-users+unsubscr...@googlegroups.com<mailto:trac-users+unsubscr...@googlegroups.com>.
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en.



No virus found in this message.
Checked by AVG - www.avg.com<http://www.avg.com>
Version: 10.0.1209 / Virus Database: 1500/3583 - Release Date: 04/19/11

-- 
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] Help needed

2011-04-19 Thread Matthew Caron

This happened when I increased the size of the partition where the reos were 
stored.


I presume you both increased the partition *and* the filesystem 
inhabiting it.


Did you fsck the revised partition?

--
Matthew Caron
Build Engineer
Sixnet | www.sixnet.com
O +1 518 877 5173 Ext. 138
F +1 518 602 9209
matt.ca...@sixnet.com

--
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] Help?

2011-01-21 Thread Matthew Caron

On 01/21/2011 12:07 PM, Guilliams, Ken wrote:

I have a new ticket created. In the action field, the green dot is lit
at the bottom of the ticket with State Leave as New. I want to move the
ticket to the next State but cannot get it out of New? Can someone help
me?


1. This is a new conversational thread. Please follow standard list 
etiquette and do not start a new one by replying to an old one. Start a 
new one.


2. Can you be more specific about the issue. "cannot get it out of New" 
can mean "there are no other options to select" or "when I select 
another state, I get an error", or something else. What exactly are you 
seeing?


3. What is the workflow set up for that ticket type?
--
Matthew Caron
Build Engineer
Sixnet | www.sixnet.com
O +1 518 877 5173 Ext. 138
F +1 518 602 9209
matt.ca...@sixnet.com

--
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] HELP: trac cgi 403 Forbidden error after login

2010-07-01 Thread anton
I found a workaround:

I used a different link to access my trac.

It seems that some intermediate server do
some caching in some circumstances.

Here my question: does somebody know
how I can configure trac to avoid caching
( at least for the login ..)

Thanks

  Anton


anton wrote:

> Hi,
> 
> I have a strane problem here with my new trac 0.12 setup.
> 
> I use apache 2.2.15 on solaris + python 2.5.4+ trac 0.12.
> 
> I configured it to use cgi with basic auth.
> 
> I use:
> 
>   SetEnv TRAC_ENV_PARENT_DIR "/projects/mytracs"
> 
> 
> Now the strange thing:
> 
> 1. I go to my trac instance http:localhost/trac/prj1
> 
> 2. I get the Page telling me "  Error: Forbidden ..."
>( I see in firebug the 403 error)
> 
> 3. I click on login
> 
> 4. I type my name + password + OK
> 
> 5. I am back on the same page as in 2
> 
> 6. *NOW* the strange thinks begins
> 
> 7. I click on "Preferences"
> 
> 8. now I see all tabs like wiki, timeline ... an I am in the system
> 
> If I test the (almost) same configureation on my suse linux it works.
> 
> Does somebody have ever expierenced the same problem
> 
> Since one day I am trying got get it to work :-(
> 
> Any advice/hint welcome...
> 
>  Anton
> 
> 


-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to trac-us...@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] Help with new trac 12 plugin upgrade

2010-06-23 Thread Christian Boos

Hello,

The post and this answer is probably belonging to Trac-dev, but anyway...

On 6/22/2010 5:43 PM, bobbysmith007 wrote:

I am trying to port all of the plugins I maintain to trac 12 (Timing and
Estimation and Estimator primarily).

The issue I am having is this:  When I was managing transactions myself
a single sql statement throwing an exception was not an issue.  As such
I could take certain actions that were valid for a specific backend and
invalid for other backends, and by handling this error, the upgrade
process would still go through.
   


If you're talking about the upgrade process only, then you have to 
realize that there's anyway no global transaction going on. For most 
backends (well, any except PostgreSQL), most of the changes happening 
during an upgrade like creating a new table, adding a column, etc. will 
do an implicit commit and can't be rollbacked.

See http://trac.edgewall.org/changeset/9568 in particular.


An example:  updating the sequences in postgresql to contain the new
correct value (after manually inserting rows with new ids).  This is not
necessary and invalid in sqllite but seemed necessary in Postgresql, so
that there would not be duplicate ids.
   


Bitten has this problem as well, IIRC. Would be nice to have a 
"standard" way to handle this, which is what 
http://trac.edgewall.org/ticket/8575 is about. There's an 
"update_sequence" function you could try, and if that works, this could 
be turned into a patch which would add corresponding dummy functions for 
the other backends...



Another example is checking for table existence.  Given there is not
cross platform way to do this, the easiest I had been able to come up
with was to select a row from it, and if that succeeds the table exists,
otherwise it is false.
   


We have some code that does something like that (getting a list of 
tables) in trac/test.py, in the reset_*_db methods. Feel free to propose 
a patch moving this to trac/db/util.py.



Is there anyway to get a second, out of transaction connection (yes I
know all the inherent dangers of this)?
   


No, but as explained above, you don't really need this in the context of 
an upgrade.


-- Christian


Are there better backend methods to be using?
Is there a way to not have a single exception on a connection invalidate
the entire transaction?
Do I just need to write special cased update code based on the database
backend type I am connecting to?

Thanks for the advice,
Russ

   


--
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to trac-us...@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] Help with new trac 12 plugin upgrade

2010-06-23 Thread Nick Piper

Russ,

On 22/06/10 16:43, bobbysmith007 wrote:

I am trying to port all of the plugins I maintain to trac 12 (Timing and
Estimation and Estimator primarily).


We've been thinking about this too. I asked a couple of questions on 
IRC, but not come up with anything great yet.


Attached is what we have so far, but it's not at all good. Mostly kind 
of a hack to "make it work" for now...


I think the dbhelper.py layer functions are not so necessary these days, 
and it could be easier to read without them?


(note the revision numbers are not those of trac-hacks.org)

Regards,

 Nick

--
nick.pi...@logica.com | www.logica.com
Logica UK Limited, registered in England & Wales (registered number 947968)
Registered Office: 250 Brook Drive, Green Park, Reading RG2 6UA, United 
Kingdom


Sorry for this disclaimer:
Index: 
trunk/plugins/open/timingandestimationplugin/timingandestimationplugin/api.py
===
--- 
trunk/plugins/open/timingandestimationplugin/timingandestimationplugin/api.py   
(revision 325)
+++ 
trunk/plugins/open/timingandestimationplugin/timingandestimationplugin/api.py   
(revision 452)
@@ -72,6 +72,6 @@
 # Legacy support hack (supports upgrades from 0.1.6 to 0.1.7)
 if self.db_installed_version == 0:
+report_version = dbhelper.db_table_exists(self, 'report_version');
 bill_date = dbhelper.db_table_exists(self, 'bill_date');
-report_version = dbhelper.db_table_exists(self, 'report_version');
 if bill_date and report_version:
 self.db_installed_version = 1
Index: 
trunk/plugins/open/timingandestimationplugin/timingandestimationplugin/dbhelper.py
===
--- 
trunk/plugins/open/timingandestimationplugin/timingandestimationplugin/dbhelper.py
  (revision 325)
+++ 
trunk/plugins/open/timingandestimationplugin/timingandestimationplugin/dbhelper.py
  (revision 452)
@@ -2,58 +2,31 @@
 def get_all(com, sql, *params):
 """Executes the query and returns the (description, data)"""
-db = com.env.get_db_cnx()
+db = com.env.get_read_db()
 cur = db.cursor()
 desc  = None
 data = None
-try:
-cur.execute(sql, params)
-data = list(cur.fetchall())
-desc = cur.description
-db.commit();
-except Exception, e:
-com.log.error('There was a problem executing sql:%s \n \
-with parameters:%s\nException:%s'%(sql, params, e));
-db.rollback();
-try:
-db.close()
-except:
-pass
-
+cur.execute(sql, params)
+data = list(cur.fetchall())
+desc = cur.description
 return (desc, data)
 
 def execute_non_query(com,  sql, *params):
 """Executes the query on the given project"""
-db = com.env.get_db_cnx()
+@com.env.with_transaction()
+def do_execute(db):
+cur = db.cursor()
+cur.execute(sql, params)
+
+def get_first_row(com,  sql, *params):
+""" Returns the first row of the query results as a tuple of values (or 
None)"""
+db = com.env.get_read_db()
 cur = db.cursor()
 try:
 cur.execute(sql, params)
-db.commit()
+return cur.fetchone()
 except Exception, e:
 com.log.error('There was a problem executing sql:%s \n \
-with parameters:%s\nException:%s'%(sql, params, e));
-db.rollback();
-try:
-db.close()
-except:
-pass
-
-def get_first_row(com,  sql,*params):
-""" Returns the first row of the query results as a tuple of values (or 
None)"""
-db = com.env.get_db_cnx()
-cur = db.cursor()
-data = None;
-try:
-cur.execute(sql, params)
-data = cur.fetchone();
-db.commit();
-except Exception, e:
-com.log.error('There was a problem executing sql:%s \n \
-with parameters:%s\nException:%s'%(sql, params, e));
-db.rollback()
-try:
-db.close()
-except:
-pass
-return data;
+with parameters:%s\nException:%s'%(sql, params, e))
+return None
 
 def get_scalar(com, sql, col=0, *params):
@@ -66,39 +39,21 @@
 
 def execute_in_trans(com, *args):
-db = com.env.get_db_cnx()
-cur = db.cursor()
-result = True
-try:
+@com.env.with_transaction()
+def do_execute(db):
+cur = db.cursor()
 for sql, params in args:
 cur.execute(sql, params)
-db.commit()
-except Exception, e:
-com.log.error('There was a problem executing sql:%s \n \
-with parameters:%s\nException:%s'%(sql, params, e));
-db.rollback();
-result = e
-try:
-db.close()
-except:
-pass
-return result
+return True
 
 def db_table_exists(com,  table):
-db = com.env.get_db_cnx()
-sql = "SELECT * FROM %s LIMIT 1" % table;
-cur = db.cursor()
-has_table = True;
-try:
-cur.execute(sql)
-db.commit()
-except