> On May 14, 2015, at 11:41 PM, RjOllos <[email protected]> wrote: > > On Thursday, May 14, 2015 at 4:20:34 PM UTC-7, Josh Santangelo wrote: > My Trac setup comprises many projects supported by SimpleMultiProjectPlugin, > and many repositories specified in the admin interface. I was also using the > GitHub plugin, but have since moved away from GitHub and removed the plugin. > Now, the results of a trac-admin env changeset command result in something > like "In [changeset:"ae451ea72898091ac0fdcf74bc5aa21794f943c1/GGR"]:" being > added to a ticket. I'm wondering how to get the changeset links working > again, and directing to the internal source browser. > > The TracGit <http://trac.edgewall.org/wiki/TracGit> page seems to indicate > that I should specify a repository_dir, but since I have many, that doesn't > seem to make sense. It looks like perhaps I could define multiple > repositories in a [repositories] block, but that's in 1.1+. > > Am I just out of luck unless I switch to the 1.1 branch of trac? > > Trac supports the [repositories] section since 0.12, when multi-repository > support was added. That documentation section is just saying that when you > specify a repository when creating an environment in Trac < 1.1.3, the > configuration will be added to the [trac] section. That's the old, now > deprecated single-repository way of specifying the configuration, and we > really should have modified the TracAdmin initenv command back in Trac 0.12 > to create the repository in the [repositories] section. In Trac 1.1.3 we > removed the [trac] repository_dir option, added an upgrade step will modify > trac.ini to add an equivalent repositories section and modified the initenv > command to add repositories to the [repository] section of trac.ini.
Good that [repositories] is supported in my version of Trac, but it’s still unclear to me what to put in there. The docs show: [repositories] .type = git .dir = /path/to/my/git/repository/.git Do I just repeat .type and .dir for each repository? Is something supposed to go before the dot? And what is the difference between [repositories] and the /admin/versioncontrol/repository page, where I already have all of my repositories entered? > So I suggest: > 1. give this documentation section a quick read: > http://trac.edgewall.org/wiki/TracGit#AddingaGitrepositorytoanexistingenvironment > 2. move your configuration to the [repositories] section (not required unless > you want to support multiple repositories, but might as well do it anyway) > 3. run ` trac-admin $env repository resync "(default)" ` (and repeat for > every other repository if you have multiple repositories). > > I feel like I'm probably not understanding something about your configuration > and why new ticket changesets links would be directing to GitHub if the > plugin has been removed. You may need to modify your post-commit hook. IIRC > GitHub plugin used a post-commit hook other than the Trac default one. I probably wasn’t very clear — my changeset links aren’t directing to GitHub — they’re directing to nothing at all. Here is a screenshot. https://www.dropbox.com/s/19i6l6t8y9aiigv/Screenshot%202015-05-21%2013.57.19.png?dl=0 <https://www.dropbox.com/s/19i6l6t8y9aiigv/Screenshot%202015-05-21%2013.57.19.png?dl=0> I haven’t been using a post-commit hook, I’ve been using a script which polls my repos and calls "trac-admin env changeset added" when new commits show up. It’s sort of janky but mostly works. thanks, -josh -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/trac-users. For more options, visit https://groups.google.com/d/optout.
