Changes between Initial Version and Version 1 of OneRepoManyTracSitesPatch


Ignore:
Timestamp:
Oct 20, 2015, 3:08:14 PM (9 years ago)
Author:
Nathan Wright
Comment:

New hack OneRepoManyTracSitesPatch, created by wrightnn

Legend:

Unmodified
Added
Removed
Modified
  • OneRepoManyTracSitesPatch

    v1 v1  
     1[[PageOutline(2-5,Contents,pullout)]]
     2
     3= One Repository Commit Can Update Tickets From Multiple Trac Sites
     4
     5== Description
     6
     7We have multiple repositories and multiple Trac sites.  Our users expressed a need to be able to update tickets on multiple Trac sites from a single commit comment in a repository.
     8
     9For example, consider the commit:
     10{{{
     11Updated the foo to fix the bar.
     12
     13Closes #71
     14See #42 as well
     15}}}
     16
     17Our problem was that ticket 71 existed in TracSiteA, and ticket 42 existed in TracSiteB.  On TracSiteA, the comment would be added to ticket 71 and 42, but ticket 42 on TracSiteA had nothing to do with the issue.  Similarly on TracSiteB, the comment would be added to ticket 42, with an unknown link to the non-existent ticket 71 on that site.
     18
     19This patch enables our users to commit thusly:
     20{{{
     21Updated the foo to fix the bar.
     22
     23Closes #71@TracSiteA
     24See #42@TracSiteB as well
     25}}}
     26
     27The comments only get added to TracSiteA ticket 71 and TracSiteB ticket 42.  As some added gravy this patch also converts the comments so that the links take the user to the correct place.
     28
     29For example, the source of the comment on ticket 71 of TracSiteA would appear as...
     30{{{
     31Updated the foo to fix the bar.
     32
     33Closes #71@TracSiteA
     34See [[http://mytracsite.com/TracSiteB/ticket/42|#42@TracSiteB]] as well
     35}}}
     36...and the source of the comment on ticket 42 of TracSiteB would appear as...
     37{{{
     38Updated the foo to fix the bar.
     39
     40Closes [[http://mytracsite.com/TracSiteA/ticket/71|#71@TracSiteA]]
     41See #42@TracSiteB as well
     42}}}
     43... this way links created in the comment don't take our users to confusing places.
     44
     45== !Bugs/Feature Requests
     46
     47Existing bugs and feature requests for OneRepoManyTracSitesPatch are
     48[report:9?COMPONENT=OneRepoManyTracSitesPatch here].
     49
     50If you have any issues, create a
     51[/newticket?component=OneRepoManyTracSitesPatch new ticket].
     52
     53[[TicketQuery(component=OneRepoManyTracSitesPatch&group=type,format=progress)]]
     54
     55== Download
     56
     57Download the zipped source from [export:onerepomanytracsitespatch here].
     58
     59== Source
     60
     61You can check out OneRepoManyTracSitesPatch from [http://trac-hacks.org/svn/onerepomanytracsitespatch here] using Subversion, or [source:onerepomanytracsitespatch browse the source] with Trac.
     62
     63== Installation
     64
     65Apply the patch to tracopt/ticket/commit_updater.py.
     66
     67Update your trac.ini file.  Following the scenario in the description:
     68
     69TracSiteA's ini has...
     70{{{
     71[ticket]
     72commit_ticket_update_name_is_required = true
     73
     74[commit_ticket_update_inversions]
     75TracSiteB = http://mytracsite.com/TracSiteB/ticket/
     76}}}
     77...and TracSiteB's ini has...
     78{{{
     79[ticket]
     80commit_ticket_update_name_is_required = true
     81
     82[commit_ticket_update_inversions]
     83TracSiteA = http://mytracsite.com/TracSiteA/ticket/
     84}}}
     85
     86
     87== Recent Changes
     88
     89[[ChangeLog(onerepomanytracsitespatch, 3)]]
     90
     91== !Author/Contributors
     92
     93**Author:** [wiki:wrightnn] [[BR]]
     94**Maintainer:** [[Maintainer]] [[BR]]
     95**Contributors:**