CommitTicketUpdater issue or something else?

47 views
Skip to first unread message

JST

unread,
Jun 5, 2017, 7:48:57 AM6/5/17
to Trac Users
Everything seems to be working fine except when I do an "SVN commit" and add "#<ticketNumber>"(or refs,see,etc..) nothing seems to be linked to the corresponding ticket.

But if I check the "timeline" or "browse source" everything is as it should be.

My Hooks are setup the same-way that I have always set them up (same as working configuration on other machines).

Any ideas where I should start?  Any help would be greatly appreciated.

Ryan Ollos

unread,
Jun 5, 2017, 7:52:25 AM6/5/17
to Trac Users
Which Trac versions?

It sounds like you are probably using the "sync per request" option, but haven't enabled explicit synchronization.


Could you please share your [trac] and [repositories] sections from trac.ini?

- Ryan

JST

unread,
Jun 5, 2017, 8:02:04 AM6/5/17
to Trac Users, rjo...@gmail.com
Ryan..thanks for the quick response.  Here ya go.

[trac]
auth_cookie_lifetime = 0
auth_cookie_path =
auto_preview_timeout = 2.0
auto_reload = disabled
backup_dir = db
base_url =
check_auth_ip = disabled
database = sqlite:db/trac.db
debug_sql = disabled
default_charset = iso-8859-15
genshi_cache_size = 128
htdocs_location =
ignore_auth_case = disabled
mysqldump_path = mysqldump
never_obfuscate_mailto = enabled
permission_policies = ReadonlyWikiPolicy,DefaultPermissionPolicy,LegacyAttachmentPolicy
permission_store = DefaultPermissionStore
pg_dump_path = pg_dump
resizable_textareas = enabled
secure_cookies = disabled
show_email_addresses = enabled
show_ip_addresses = disabled
timeout = 20
use_base_url_for_redirect = disabled

[repositories]
.dir = /svn/repositories/my-project
.type = svn
.sync_per_request = false
my-project.sync_per_request = false

Ryan Ollos

unread,
Jun 5, 2017, 8:05:50 AM6/5/17
to Trac Users
To be sure, you are using Trac 1.2?

Is the default repository the one for which CommitTicketUpdater is not working?

Have you setup the repository hooks for explicit synchronization?

- Ryan
 

JST

unread,
Jun 5, 2017, 8:07:41 AM6/5/17
to Trac Users, rjo...@gmail.com
Trac 1.2.1


On Monday, June 5, 2017 at 7:52:25 AM UTC-4, RjOllos wrote:

JST

unread,
Jun 5, 2017, 8:11:54 AM6/5/17
to Trac Users, rjo...@gmail.com
Actually I am not currently testing it with the default repository (does this matter) on my other setup I'm 99% sure the repository didnt make a difference.

Also here are my post-commit and post-revprop

trac-admin "/trac/projects/my-project" changeset modified $1 $2

RjOllos

unread,
Jun 5, 2017, 8:24:06 AM6/5/17
to Trac Users, rjo...@gmail.com


On Monday, June 5, 2017 at 8:11:54 AM UTC-4, JST wrote:
Actually I am not currently testing it with the default repository (does this matter) on my other setup I'm 99% sure the repository didnt make a difference.

It shouldn't matter, I was just trying to make sense of your [repositories] section. Have you also defined some repositories through the database? That would be the case if you configured the repositories through the Admin page.
 
Also here are my post-commit and post-revprop

trac-admin "/trac/projects/my-project" changeset modified $1 $2

You may want to use trac-svn-hook:

It will create a log, which is effective in locating most problems in my experience.

Could you also share your [components] and [ticket] section?

- Ryan 

JST

unread,
Jun 5, 2017, 8:27:02 AM6/5/17
to Trac Users, rjo...@gmail.com

[components]
multipleworkflow.web_ui.multipleworkflowadminmodule = enabled
multipleworkflow.workflow.multipleworkflowplugin = enabled
simplemultiproject.admin.smpadminpanel = enabled
simplemultiproject.admin_command.smpadmincommands = enabled
simplemultiproject.admin_filter.smpaddextendedversioncolumn = enabled
simplemultiproject.admin_filter.smpfilterdefaultcomponentpanels = enabled
simplemultiproject.admin_filter.smpfilterdefaultmilestonepanels = enabled
simplemultiproject.admin_filter.smpfilterdefaultversionpanels = enabled
simplemultiproject.environmentsetup.smpenvironmentsetupparticipant = enabled
simplemultiproject.milestone.smpmilestoneproject = enabled
simplemultiproject.model.smpmodel = enabled
simplemultiproject.roadmap.smproadmapgroup = enabled
simplemultiproject.roadmap.smproadmapmodule = enabled
simplemultiproject.roadmap.smproadmapprojectfilter = enabled
simplemultiproject.ticket.projectticketspolicy = enabled
simplemultiproject.ticket.smpticketproject = enabled
simplemultiproject.timeline.smptimelineprojectfilter = enabled
simplemultiproject.version.smpversionmodule = enabled
simplemultiproject.version.smpversionproject = enabled
ticketfieldfilter.web_ui.ticketfieldfilter = enabled
ticketvalidator.ticketvalidator.ticketsvalidator = enabled
tracopt.ticket.clone.ticketclonebutton = enabled
tracopt.ticket.commit_updater.* = enabled
tracopt.ticket.commit_updater.committicketreferencemacro = enabled
tracopt.ticket.commit_updater.committicketupdater = enabled
tracopt.versioncontrol.git.git_fs.csetpropertyrenderer = disabled
tracopt.versioncontrol.git.git_fs.gitconnector = disabled
tracopt.versioncontrol.git.git_fs.gitwebprojectsrepositoryprovider = disabled
tracopt.versioncontrol.svn.* = enabled
tracopt.versioncontrol.svn.svn_fs.subversionconnector = enabled
tracopt.versioncontrol.svn.svn_prop.subversionmergepropertydiffrenderer = enabled
tracopt.versioncontrol.svn.svn_prop.subversionmergepropertyrenderer = enabled
tracopt.versioncontrol.svn.svn_prop.subversionpropertyrenderer = enabled

[ticket]
commit_ticket_update_check_perms = disabled
commit_ticket_update_commands.close =
commit_ticket_update_commands.refs = <ALL>
commit_ticket_update_envelope =
commit_ticket_update_notify = enabled
default_cc =
default_component = N/A
default_description =
default_keywords =
default_milestone = Phase 1 Install
default_owner =
default_priority = tr1 - Critical Failure
default_resolution = fixed
default_severity = A - Frequent
default_summary =
default_type = pick one
default_version = Phase 1 Part 1 Install
max_comment_size = 262144
max_description_size = 262144
preserve_newlines = default
restrict_owner = enabled
workflow = MultipleWorkflowPlugin

Ryan Ollos

unread,
Jun 5, 2017, 8:33:07 AM6/5/17
to JST, Trac Users, rjo...@gmail.com
Configuration all looks fine to me. If you've defined a repository in the database, make sure the sync_per_request is False. I'd switch to using trac-svn-hook next, and you'll probably find an indication of the issue in the hooks log that is generated by the script.

- Ryan
 

JST

unread,
Jun 5, 2017, 8:35:16 AM6/5/17
to Trac Users, jeremy...@gmail.com, rjo...@gmail.com
Thanks Ryan.  I will give it a look.

JST

unread,
Jun 7, 2017, 12:24:49 PM6/7/17
to Trac Users, jeremy...@gmail.com, rjo...@gmail.com
Ryan,

Is there a preferred/easy method of "switching" to using "trac-svn-hook"?  Trying to determine if it works in conjunction with or separate from what I already have setup.

Thanks in advance.

Ryan Ollos

unread,
Jun 7, 2017, 12:31:34 PM6/7/17
to Trac Users
On Wed, Jun 7, 2017 at 12:24 PM, JST <jeremy...@gmail.com> wrote:
Ryan,

Is there a preferred/easy method of "switching" to using "trac-svn-hook"?  Trying to determine if it works in conjunction with or separate from what I already have setup.

You'd replace the trac-admin command in your hook script with a call to trac-svn-hook. Use is documented in the header of the script and some configuration is needed. 
https://trac.edgewall.org/wiki/TracRepositoryAdmin#Usingtrac-svn-hook

- Ryan

JST

unread,
Jul 3, 2017, 2:26:33 PM7/3/17
to Trac Users, rjo...@gmail.com
I am using "trac-svn-hook" and I am able to view some logs.

I am receiving the following error "post-commit hook failed (exit code 2) with no output."

So I am still able to commit and update to the repository I am just not able to "link/ref" ticket #'s and have it linked to the corresponding ticket.

From my research it seems as if the common failure is with "exit code 2 with output" not without.  Any suggestions?

RjOllos

unread,
Jul 10, 2017, 4:31:16 PM7/10/17
to Trac Users, rjo...@gmail.com


On Monday, July 3, 2017 at 2:26:33 PM UTC-4, JST wrote:
I am using "trac-svn-hook" and I am able to view some logs.

I am receiving the following error "post-commit hook failed (exit code 2) with no output."

So I am still able to commit and update to the repository I am just not able to "link/ref" ticket #'s and have it linked to the corresponding ticket.

From my research it seems as if the common failure is with "exit code 2 with output" not without.  Any suggestions?

You could try running the script manually after changing to the users under which your webserver runs. If the webserver user is www-data, that would be something like:

su - www-data -c '/path/to/svn/hook/script "$REPOS" "$REV"', where $REPOS and $REV have been replaced with a valid repository and revision.

From the [repositories] configuration you showed, it looks like you are using the default repository and have added an alias "my-project". I'd try using both "(default)" and "my-project" as the repository name in your testing.

- Ryan

Reply all
Reply to author
Forward
0 new messages