Trac 1.4.3 + TracTicketChangelogPlugin

93 views
Skip to first unread message

Hervé B.

unread,
Jun 16, 2021, 8:52:42 AM6/16/21
to Trac Users
Hello,
We are trying to migrate our IC server. This operation is done by changing the OS (CentOS release 6.10 to RHEL 7.9). We migrated the Apache, subversion and Trac server (1.0.11 to 1.43) with these plugins.

We migrated the subversion repositories and the Trac projects.

Unfortunately, we are having trouble with the TracTicketChangelogplugin version 1.2. We no longer see the changeset of our tickets.

Could you help us solve this problem?

thanks in advance
After.png
Before.png

hervé blaize

unread,
Jun 16, 2021, 9:02:44 AM6/16/21
to trac-...@googlegroups.com
I allow myself to add 2 files (trac.ini 1.0 and 1.4)

--
You received this message because you are subscribed to a topic in the Google Groups "Trac Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/trac-users/pP978sfWSB8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to trac-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/65f06c4b-19b6-419a-aa43-97d461bff45bn%40googlegroups.com.


--
Rien n'est impossible, seules les limites de nos esprits définissent certaines choses comme inconcevables.
Trac1.0.11.pdf
Trac.1.4.3.pdf

Jun Omae

unread,
Jun 16, 2021, 8:26:46 PM6/16/21
to trac-...@googlegroups.com
Hi,
You could check logged messages in trac.log with DEBUG level and
browser console.

https://trac.edgewall.org/wiki/TracTroubleshooting#ChecktheLogs
https://trac.edgewall.org/wiki/TracTroubleshooting#ChecktheBrowserConsole


--
Jun Omae <jun...@gmail.com> (大前 潤)

RjOllos

unread,
Jun 17, 2021, 4:09:12 PM6/17/21
to Trac Users
Please try running:

> trac-admin $env ticketlog sync 

For reference:

Ryan

Clemens Feige

unread,
Jun 18, 2021, 2:20:47 AM6/18/21
to trac-...@googlegroups.com
Hello

Do not forget to establish the SVN hook scripts for your new server.
This is called SVN repository synchronization.

Have a look into the ordinary TRAC "Repo browser" or into "history". If
you do not see any SVN commit messages, then there might be an issue
with SVN repository synchronization. The TRAC core and the
TracTicketChangelogplugin need this.

https://trac-hacks.org/wiki/TracRepositoryAdmin#Synchronization

Clemens

Hervé B.

unread,
Jun 21, 2021, 9:30:30 AM6/21/21
to Trac Users
Hello, I created a post-commit file in each of the SVN repositories. Then I ran the following commands:
trac-admin /data/repository/trac-fdi repository list
trac-admin /data/repository/trac-fdi repository resync "*"
trac-admin /data/repository/trac-fdi ticketlog sync

here is the console trace:
[root@srvsic:/data/repository]$ trac-admin /data/repository/trac-fdi repository list

Name      Type  Alias  Directory
-----------------------------------------------------------
Echanges  svn          /data/repository/subversion/ECHANGES
Métier    svn          /data/repository/subversion/METIER
Outils    svn          /data/repository/subversion/OUTILS

[root@srvsic:/data/repository]$ trac-admin /data/repository/trac-fdi repository resync "*"
Resyncing repository history for Echanges...
769 revisions cached.
Resyncing repository history for Métier...
18311 revisions cached.
Resyncing repository history for Outils...
4365 revisions cached.
Done.
[root@srvsic:/data/repository]$ trac-admin /data/repository/trac-fdi ticketlog sync
[root@srvsic:/data/repository]$


post-commit
#!/bin/sh
# POST-COMMIT HOOK
echo $(date) 'POST-COMMIT' > /tmp/hooks.log
REPOS="$1"
REV="$2"
export PYTHON_EGG_CACHE="/data/repository/trac-fdi/.egg-cache"
/usr/bin/trac-admin "/data/repository/trac-fdi" changeset added $REPOS $REV
exit


unfortunately I still can't see the changesets.

Hervé

Hervé B.

unread,
Jun 21, 2021, 11:11:41 AM6/21/21
to Trac Users
I tested the post-commit script. It works well.

Hervé B.

unread,
Jun 22, 2021, 10:35:19 AM6/22/21
to Trac Users
Hello,
I still have my problem. I don't see any changeset.

Do you have an idea to investigate?

RjOllos

unread,
Jun 22, 2021, 10:42:01 PM6/22/21
to Trac Users
On Tuesday, June 22, 2021 at 7:35:19 AM UTC-7 Hervé B. wrote:
Hello,
I still have my problem. I don't see any changeset.

Do you have an idea to investigate?

Suggest doing as Jun suggested and checking the logs for:

On Wednesday, June 16, 2021 at 5:26:46 PM UTC-7 Jun Omae wrote:
Hi,

Hervé B.

unread,
Jun 23, 2021, 8:07:30 AM6/23/21
to Trac Users
Hello,
With version 1.4.3, there is a new table that appears in the database: ticket_revision.

With version 1.0.11 here is the SQL query in the trac.log file:
2021-06-23 11: 34: 21,476 Trac [util] DEBUG: SQL:
            SELECT p.value, v.rev, v.author, v.time, v.message
                FROM revision v
                LEFT JOIN repository p
                ON v.repos = p.id AND p.name = 'name'
                WHERE message LIKE% s

2021-06-23 11: 34: 21,476 Trac [util] DEBUG: args: ['% # 1207%']
2021-06-23 11: 34: 21,514 Trac [util] DEBUG: prefetch: 6 rows

The result is 6 lines and the parameter '% # 1207%'

With version 1.4.3 here is the SQL query in the trac.log file:

2021-06-23 13: 54: 47,360 Trac [util] DEBUG: SQL:
                SELECT p.value, r.rev, r.author, r.time, r.message
                FROM ticket_revision AS tr
                 LEFT JOIN revision AS r
                  ON r.repos = tr.repos AND r.rev = tr.rev
                 LEFT JOIN repository AS p
                  ON p.id = tr.repos AND p.name = 'name'
                WHERE tr.ticket =% s

2021-06-23 13: 54: 47,360 Trac [util] DEBUG: args: (1207,)
2021-06-23 13: 54: 47,360 Trac [util] DEBUG: prefetch: 0 rows

The result is 0 lines and the parameter 1207,

By passing the SQL query select * from ticket_revision, the table is empty.

We see that the table is empty. What did we miss in the migration? 

Hervé B.

unread,
Jun 24, 2021, 5:26:05 AM6/24/21
to Trac Users
After running the 'trac-admin $ env ticketlog sync' command, the ticket_revision table is still empty. When creating a new ticket, the ticket_revision table is always empty. Weird ...

Ryan Ollos

unread,
Jun 24, 2021, 10:53:24 AM6/24/21
to Trac Users
On Thu, Jun 24, 2021 at 2:26 AM Hervé B. <herve....@gmail.com> wrote:
After running the 'trac-admin $ env ticketlog sync' command, the ticket_revision table is still empty. When creating a new ticket, the ticket_revision table is always empty. Weird ...

Could you check the debug level log while running "ticketlog sync" command? 

Hervé B.

unread,
Jun 24, 2021, 11:08:20 AM6/24/21
to Trac Users
Hi Ryan,

I send you the log file...

trac.log

Hervé B.

unread,
Jun 24, 2021, 3:10:21 PM6/24/21
to Trac Users
The lines are not inserted and there is no error. How can we debug the web_ui.py script or the SQL commands?

RjOllos

unread,
Jun 24, 2021, 10:58:35 PM6/24/21
to Trac Users
On Thursday, June 24, 2021 at 12:10:21 PM UTC-7 Hervé B. wrote:
The lines are not inserted and there is no error. How can we debug the web_ui.py script or the SQL commands?

It appears there are no ticket ids parsed from the change log at this location in the code, otherwise we would see SQL statements in the log after the "Trying to sync ..." messages:


What pattern are you using to reference tickets? Can you show an example message that references a ticket?

As described in the link below, you may need to configure the commit_ticket_update options:

Ryan

Hervé B.

unread,
Jul 2, 2021, 5:03:35 AM7/2/21
to Trac Users
Hello,

Finally I was able to install TicketChangelogPlugin. I had a problem with the pattern of our tickets.

Here is what I configured in trac.ini to make the plugin work:
[ticket]
commit_ticket_update_envelope =
commit_ticket_update_commands.close =
commit_ticket_update_commands.refs = <ALL>
commit_ticket_update_check_perms = true
commit_ticket_update_notify = true

The problem was on commit_ticket_update_envelope.
Thank you for the help you have given me.

Herve
Reply all
Reply to author
Forward
0 new messages