Re: [Trac] Re: PostgreSQL - a straw poll

2014-08-13 Thread Dmitri Maziuk

On 8/12/2014 7:00 PM, Ryan Ollos wrote:


I would emphasize again to Jared, unless you have a good reason to
migrate to PostgreSQL, you are much better off sticking with SQLite. You
will find fewer problems with plugins when using SQLite. I would go as
far as to say, if you plan to utilize dozens of plugins and you can't
fix issues that you'll experience with PostgreSQL on your own, you
should stick with SQLite.


Might be worth looking into sqlalchemy for the next development cycle...

Dima


--
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/d/optout.


Re: [Trac] Re: PostgreSQL - a straw poll

2014-08-13 Thread W. Martin Borgert

Quoting Dmitri Maziuk dmaz...@bmrb.wisc.edu:

Might be worth looking into sqlalchemy for the next development cycle...


An ORM in Trac? That would be to good to be true!

(I remember, that there were discussions about using an ORM before, and
that there was a lot of resistance. I don't recall, why that was.)

--
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/d/optout.


Re: [Trac] Re: PostgreSQL - a straw poll

2014-08-13 Thread Ryan Ollos
On Wed, Aug 13, 2014 at 7:52 AM, Dmitri Maziuk dmaz...@bmrb.wisc.edu
wrote:

 On 8/12/2014 7:00 PM, Ryan Ollos wrote:

  I would emphasize again to Jared, unless you have a good reason to
 migrate to PostgreSQL, you are much better off sticking with SQLite. You
 will find fewer problems with plugins when using SQLite. I would go as
 far as to say, if you plan to utilize dozens of plugins and you can't
 fix issues that you'll experience with PostgreSQL on your own, you
 should stick with SQLite.


 Might be worth looking into sqlalchemy for the next development cycle...

 Dima


Just to be clear, there is not any problem with Trac and it's database API.
The issue is that developers don't follow the guidelines for database API
usage to make their plugins cross-db compatible. Further, most developers
only test with SQLite.
http://trac.edgewall.org/wiki/TracDev/DatabaseApi#RulesforDBAPIUsage

The ORM could make it less likely that developers make errors when writing
database access code, but that would remain to be seen and depend on
implementation details.

-- 
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/d/optout.


[Trac] Problem with Git and CommitTicketUpdater (old commit message interpreted again)

2014-08-13 Thread W. Martin Borgert

Hi,

I'm using Trac with Git and the nice CommitTicketUpdater.

Problem: When a ticket is closed via a commit message in a branch,
later the ticket is re-opened, and then the branch gets merged and
pushed, the ticket gets closed again.

In theory, a commit message, that has been seen and interpreted by
Trac should not be interpreted again, when only a merge is done,
right?

Or better(?), closes/fixes should be interpreted as refs only.

Any solution for this?

Cheers

--
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/d/optout.


Re: [Trac] Re: PostgreSQL - a straw poll

2014-08-13 Thread Dimitri Maziuk
On 08/13/2014 10:08 AM, Ryan Ollos wrote:

 Just to be clear, there is not any problem with Trac and it's database API.
 The issue is that developers don't follow the guidelines for database API
 usage to make their plugins cross-db compatible.

IME being cross-compatible is a major PITA even when I am the only
developer. Paramstyle is one of the more obvious examples.

 The ORM could make it less likely that developers make errors when writing
 database access code, but that would remain to be seen and depend on
 implementation details.

Sqlalchemy has the core layer that provides an engine-agnostic sql
wrapper -- arguably ugly, possibly less efficient, but it's there.

-- 
Dimitri Maziuk
Programmer/sysadmin
BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu



signature.asc
Description: OpenPGP digital signature


Re: [Trac] Re: PostgreSQL - a straw poll

2014-08-13 Thread Dimitri Maziuk

 Sqlalchemy has the core layer that provides an engine-agnostic sql
 wrapper -- arguably ugly, possibly less efficient, but it's there.

That is, you don't have to use the ORM layer if you don't need to, you
can just use the core.

(sorry to f'up on my own post)
-- 
Dimitri Maziuk
Programmer/sysadmin
BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu



signature.asc
Description: OpenPGP digital signature


[Trac] Trac Layout Recipe - Help

2014-08-13 Thread Jared Bownds


URL:  http://trac.edgewall.org/wiki/CookBook/TracLayoutRecipe

I've followed the instructions listed in the URL above to the best of my 
ability, but I'm obviously not setting something properly in the css 
configuration.

All graphics located in the gfx directory are accessible via base 
url/chrome/site/gfx/shadow.gif  - and are one level up from the location 
of the htdocs folder containing projects.css

What am I doing wrong?  I've successfully configured other css and 
site.html in the context of trac in the past.

*Index:*


   1. Present state of trac development site
   2. Trac.ini snippet
   3. site.html (modified to read css from htdocs)
   4. projects.css 
   


Present state of trac development site

https://lh3.googleusercontent.com/-2wFd1nfQ3co/U-uURT0eAhI/ASk/_8NpgK4Y9BU/s1600/TracLayoutRecipe_Broken.png


Trac.ini

[inherit]

plugins_dir = /srv/trac/trac/plugins

templates_dir = /srv/trac/trac/templates


site.html

html xmlns=http://www.w3.org/1999/xhtml;

  xmlns:xi=http://www.w3.org/2001/XInclude;

  xmlns:py=http://genshi.edgewall.org/;

  py:strip=


  !--! Add site-specific style sheet --

  head py:match=head py:attrs=select('@*')

${select('*|comment()|text()')}

!--! The following line adds the projects.css,

   assuming it is available via the relative path 
/htdocs/projects.css

   if the css directory is available via a different URL,

   change it here. --

link rel=stylesheet type=text/css href=/htdocs/projects.css /

  /head


  py:match path=body once=true buffer=falsebody


div id=wrapper

  div id=topbar

a id=home-link href=/trac/Site Index/a

  /div


  div id=ew-header

   div id=topnav

ul

!--! The following block of list items is the top navigation bar,

   that allows quick jumps between the available projects.

   Currently it includes the projects of Edgewall Software, as 
examples.

   You will need to modify the list according to your projects.

   Note that each list item (except for 'Home') has a class 
property

   that is assigned active if the current project is the 
active one.

   You will also need to modify the tests for every item to 
check

   against the correct name of each project.

   In addition, each anchor element has a class that allows 
formatting

   each item independently from other items (see projects.css) 
--

 lia href=http://www.edgewall.org/;Home/a/li

 li class=${project.name=='The Trac Project' and 'active' or 
None}

   a class=trac href=http://trac.edgewall.org/;Trac/a

 /li

 li class=${project.name=='Genshi' and 'active' or None}

   a class=genshi href=http://genshi.edgewall.org/;Genshi/a

 /li

 li class=${project.name=='Babel' and 'active' or None}

   a class=babel href=http://babel.edgewall.org/;Babel/a

 /li

 li class=${project.name=='Bitten' and 'active' or None}

   a class=bitten href=http://bitten.edgewall.org/;Bitten/a

 /li

 li class=${project.name=='Posterity' and 'active' or None}

   a class=posterity 
href=http://posterity.edgewall.org/;Posterity/a

 /li

/ul

   /div

 /div


 div id=ew-main

   div id=ew-content


 !--! The following line adds the left box with quick links.

The site_leftbox.html file is the template for the left box,

and should be located in the same directory as the 
site.html file.

Refer to this file for further details. --

 xi:include href=site_leftbox.htmlxi:fallback//xi:include


 ${select('*|text()')}


/div!-- #ew-content --

  /div

/div

div id=ew-footer

  !--! This is the page footer, where you can include contact  
copyright info --

  pa href=mailto:contact@mail;contact@mail/a/p

  pCopyright copy; Copyright String. All rights reserved./p

/div


div id=right


 !--! The following line adds the right box.

The site_rightbox.html file is the template for the right 
box,

and should be located in the same directory as the 
site.html file.

An example is not included,

but the concept is identical to the left box... --

 xi:include href=site_rightbox.htmlxi:fallback//xi:include


   /div

  /body/py:match

/html


projects.css

body { background: #4b4d4d url(../gfx/bkgnd_pattern.png); margin: 0; 
padding: 0; }


h1 { color: #555; font-size: 26px; margin: 1em 0 .5em 0; }

h1 :link, h1 :visited, h2 :link, h2 :visited, h3 :link, h3 :visited {

  border: none;

}

h2 { margin-top: 2em; font-style: normal; }


#wrapper { background: #4b4d4d url(../gfx/shadow.gif) 100% 0 repeat-y;

  padding: 0 145px 0 0; margin-left: 100px;

}

#topbar { 

Re: [Trac] Re: PostgreSQL - a straw poll

2014-08-13 Thread Jared Bownds
Sound advise, thanks for pointing out the big picture.

On Tuesday, August 12, 2014 5:00:54 PM UTC-7, RjOllos wrote:

 On Tue, Aug 12, 2014 at 1:07 PM, Steffen Hoffmann hof...@web.de 
 javascript: wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 On 12.08.2014 19:11, Jared Bownds wrote:
  After checking the postgres DB after the migration, there is no
  table called subtickets. Perhaps the migration script is not
  equipped to include this type of table?

 I've had a quick look at TracMigratePlugin. Its unlikely that it
 misses specific tables as it is designed to copy ALL tables.

 Unless there was an error on migration, as Ryan already suggested.
 Another look, this time at TracSubticketsPlugin source confirms, that
 the plugin i.e. provides integer version numbers from
 tracsubtickets/db_default.py for writing to Trac db table system (see
 tracsubtickets/api.py), but that table is defined with text columns.
 So type sloppiness is a likely cause of the TracSubticketsPlugin
 upgrade failure that you shall see on migration.

 Steffen Hoffmann


 That is an interesting find.

 I would emphasize again to Jared, unless you have a good reason to migrate 
 to PostgreSQL, you are much better off sticking with SQLite. You will find 
 fewer problems with plugins when using SQLite. I would go as far as to say, 
 if you plan to utilize dozens of plugins and you can't fix issues that 
 you'll experience with PostgreSQL on your own, you should stick with 
 SQLite. You may find yourself waiting around for others to fix things, 
 which in some cases may never happen. Many of the plugins don't have a 
 maintainer at the moment.


  

-- 
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/d/optout.


Re: [Trac] Problem with Git and CommitTicketUpdater (old commit message interpreted again)

2014-08-13 Thread Peter Suter

Hi,

On 13.08.2014 17:17, W. Martin Borgert wrote:

I'm using Trac with Git and the nice CommitTicketUpdater.

Problem: When a ticket is closed via a commit message in a branch,
later the ticket is re-opened, and then the branch gets merged and
pushed, the ticket gets closed again.

In theory, a commit message, that has been seen and interpreted by
Trac should not be interpreted again, when only a merge is done,
right?

Or better(?), closes/fixes should be interpreted as refs only.

Any solution for this?


What hook script are you using to call trac-admin changeset added?
I think the solution is not to send such changesets to Trac more than once.
Maybe try the one proposed here:
http://trac.edgewall.org/ticket/10730#comment:8

Cheers

--
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/d/optout.


Re: [Trac] Problem with Git and timeline filter done by

2014-08-13 Thread Peter Suter

Hi,

On 13.08.2014 17:29, W. Martin Borgert wrote:

Hi,

I have a number of users in my Trac, e.g. ab with name Abe Blue 
and email
address a...@foobar.com. The Git commits are done be Abe Blue 
a...@foobar.com

which is, of course, the same person.

When I filter for done by: ab, I do get all actions by that user in 
Trac, but

not the Git commits, nor ticket updates initiated by Git commit messages.

Neither done by: Abe Blue a...@foobar.com nor done by: Abe Blue 
filter the

Git commits, however - I don't get any results at all.

Do I have to configure something in either Git or Trac, to make the 
timeline

filter work as expected?

TIA and Cheers



Unfortunately Trac has no such mapping feature I think.
There is a ticket about this:
http://trac.edgewall.org/ticket/10640

It even has a patch attached that you could test.

Cheers

--
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/d/optout.


Re: [Trac] Problem with Git and timeline filter done by

2014-08-13 Thread Peter Suter

On 13.08.2014 19:38, Peter Suter wrote:

Hi,

On 13.08.2014 17:29, W. Martin Borgert wrote:

Hi,

I have a number of users in my Trac, e.g. ab with name Abe Blue 
and email
address a...@foobar.com. The Git commits are done be Abe Blue 
a...@foobar.com

which is, of course, the same person.

When I filter for done by: ab, I do get all actions by that user in 
Trac, but
not the Git commits, nor ticket updates initiated by Git commit 
messages.


Neither done by: Abe Blue a...@foobar.com nor done by: Abe Blue 
filter the

Git commits, however - I don't get any results at all.

Do I have to configure something in either Git or Trac, to make the 
timeline

filter work as expected?

TIA and Cheers



Unfortunately Trac has no such mapping feature I think.
There is a ticket about this:
http://trac.edgewall.org/ticket/10640

It even has a patch attached that you could test.

Cheers

Actually there is one feature already in TracGit (also mentioned in that 
ticket):

[git]
trac_user_rlookup = true

This maps Abe Blue a...@foobar.com to ab if the ab Trac user has 
set his Trac email address to a...@foobar.com.


(Apparently this is slow if you have many users)

http://trac.edgewall.org/wiki/TracIni#git-section

--
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/d/optout.


Re: [Trac] Problem with Git and timeline filter done by

2014-08-13 Thread Ryan Ollos
On Wed, Aug 13, 2014 at 10:51 AM, Peter Suter petsu...@gmail.com wrote:

 On 13.08.2014 19:38, Peter Suter wrote:

 Hi,

 On 13.08.2014 17:29, W. Martin Borgert wrote:

 Hi,

 I have a number of users in my Trac, e.g. ab with name Abe Blue and
 email
 address a...@foobar.com. The Git commits are done be Abe Blue 
 a...@foobar.com
 which is, of course, the same person.

 When I filter for done by: ab, I do get all actions by that user in
 Trac, but
 not the Git commits, nor ticket updates initiated by Git commit messages.

 Neither done by: Abe Blue a...@foobar.com nor done by: Abe Blue
 filter the
 Git commits, however - I don't get any results at all.

 Do I have to configure something in either Git or Trac, to make the
 timeline
 filter work as expected?

 TIA and Cheers


 Unfortunately Trac has no such mapping feature I think.
 There is a ticket about this:
 http://trac.edgewall.org/ticket/10640

 It even has a patch attached that you could test.

 Cheers

  Actually there is one feature already in TracGit (also mentioned in that
 ticket):
 [git]
 trac_user_rlookup = true

 This maps Abe Blue a...@foobar.com to ab if the ab Trac user has
 set his Trac email address to a...@foobar.com.

 (Apparently this is slow if you have many users)

 http://trac.edgewall.org/wiki/TracIni#git-section



I had been wondering why we have [git] trac_user_rlookup = false on t.e.o,
but I guess we might assume that is due to the performance issue that you
mention. I would imagine there many anonymous sessions in the t.e.o
database.

-- 
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/d/optout.


Re: [Trac] Problem with Git and timeline filter done by

2014-08-13 Thread W. Martin Borgert

Hi Peter,

Quoting Peter Suter petsu...@gmail.com:
Actually there is one feature already in TracGit (also mentioned in  
that ticket):

[git]
trac_user_rlookup = true


Works like a charm, thanks!


(Apparently this is slow if you have many users)


No problem for this specific project (= 10 committers).

Cheers

PS: Maybe this parameter should be switched on by default in the future?

--
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/d/optout.


Re: [Trac] Problem with Git and timeline filter done by

2014-08-13 Thread Ethan Jucovy
On Aug 13, 2014 1:38 PM, Peter Suter petsu...@gmail.com wrote:

 Unfortunately Trac has no such mapping feature I think.
 There is a ticket about this:
 http://trac.edgewall.org/ticket/10640

 It even has a patch attached that you could test.

FWIW I've been using this patch happily in production, and reapplying it
when upgrading Trac, since submitting it -- I prefer it over the built in
option in tracgit because it's repo-backend-agnostic and handles my
way-too-many git aliases nicely (ejucovy@, egj@, ethan.jucovy@, egj+laptop@,
lazily-committing-from-a-shared-login-on-a-dev-server@)

-Ethan

-- 
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/d/optout.


[Trac] Re: Trac Layout Recipe - Help

2014-08-13 Thread RjOllos
On Wednesday, August 13, 2014 9:50:53 AM UTC-7, Jared Bownds wrote:

 URL:  http://trac.edgewall.org/wiki/CookBook/TracLayoutRecipe

 I've followed the instructions listed in the URL above to the best of my 
 ability, but I'm obviously not setting something properly in the css 
 configuration.

 All graphics located in the gfx directory are accessible via base 
 url/chrome/site/gfx/shadow.gif  - and are one level up from the location 
 of the htdocs folder containing projects.css

 What am I doing wrong?  I've successfully configured other css and 
 site.html in the context of trac in the past.

 *Index:*


1. Present state of trac development site
2. Trac.ini snippet
3. site.html (modified to read css from htdocs)
4. projects.css 


The first hint is to view the page source (CTRL+U in Chrome). You will 
likely find that the link to projects.css is invalid.

I'm not sure where you've put your CSS files. Let's assume you do the 
following:

[inherit]
htdocs_dir = /srv/trac/trac/htdocs

and that within that htdocs directory you have:

css/projects.css
gfx/blkgnd_pattern.png
gfx/blkgrad.png
...

In the Trac Layout Recipe, there is a step //make sure to update the URL if 
needed for your setup.// I suspect that is the one you missed.

You need to edit the 13th line in site.html to point to the CSS file:
href=${href.chrome('shared/css/projects.css'})


-- 
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/d/optout.