Hi devs, With reference to the recent discussions about git, trac and git, git performance, features and more, I've decided that perhaps now is a good time to release a new plugin: TracGitServe plugin
It is a plugin that implements git access and administration features in Trac. I've never used Gitolite, Gitosis and similar, but imagine that my plugin is a decent alternative to those tools - and obviously superiour in many ways for Trac projects as all features are integrated. The internals of the git access via Trac is a modified version of the the original pygit2 branch, with some changes and fixes backported there. I understand Jun has since made a separate Git plugin based on pygit2. I don't know the differences between these versions at the moment, but if feasible I'd be happy to redo my code to use that instead of maintaining it myself. What I will not do is go back to using the Trac-bundled git support that essentially calls out to the git executable in subprocesses. The performance was not good for a big site as CodeResort.com, but the main problem was instabilities - frequently the server just hung from exhausted resources. Retrieving a large changeset with many files and changes would hang the webserver forcing process restarts. With pygit2/libgit2 it has been running flawlessly since day one. Fast, stable, low memory, and low general resource usage. That said, my plugin still uses the original Trac-bundled git support for 'administration' purposes - it uses it to create/clone/delete repositories, and read/write of repository config values. I'd like to move this code to pygit2 as well, but that is still on the todo-list. Ideally I'd like to not have to bundle the Trac git support, and in time I no doubt will move away from it. However, at the moment I'm still using Trac 0.12.x so bundling the code has been an easy option so far. The performance is really good even without caching in Trac (which is not part of the pygit2 code that I use). Not that I'm keen on adding caching in Trac database. A tool like git and libgit2/pygit2 is so efficient at retrieving information, that duplicating this with the hope of improving it is not something I'd be wanting to put effort into. Instead, with git and pygit2 being able to make changes to the local repository clone, it would be much more interesting to push various bits of information into the git repository itself to make it easier to build new features and pursue interesting new ways of working. For instance, why can't ticket references be added in git instead with custom references to changesets? Storing objects and references is what git is very good at, and this is for instance how I believe GitHub does the logic behind pull requests where changeset objects from remote repositories are copied back to origin repository and referenced with custom pull request IDs (stored internally as +refs/pull/...). Git is an efficient object and reference store. The future of GitServe plugin with adding to the git repositories is therefore much more interesting, and with efficient retrieval and modification of repository information the core data would follow the repository code and we would not have to struggle to keep everything in sync - adding trac-admin commands, scripts and hooks to keep track of the changes we want to follow. For many uses, the repository can provide a new and better option for storage. Feel free to look at the plugin and try it out, and let me know if you want to use this in "real life". To get started, access the repository at CodeResort.com 'open' project: https://www.coderesort.com/p/open/browser/trac-gitserveplugin The information in the README.wiki displayed in the root of the project should hopefully be quite self-explanatory. For interested developers I've also added a separate section at the bottom explaining how to get started running tests and trying out the Trac-related features in a test project. The code should be relatively intuitive and well-documented, and the unit tests provide very good coverage (94%): https://www.coderesort.com/p/open/build/tracgitserve I never get tired of displaying examples of the Bitten test coverage output from builds, see for instance: https://www.coderesort.com/p/open/browser/trac-gitserveplugin/tracgitserve/admin.py?annotate=coverage To access the repository with a git client at the 'Repository URL' listed in context menu, a CodeResort login is required. Verifiable email + password only, no profile needed for this (although if you also register with a profiled account you get the ability to store your public SSH key as well). :::simon https://www.coderesort.com -- You received this message because you are subscribed to the Google Groups "Trac Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to trac-dev+unsubscr...@googlegroups.com. To post to this group, send email to trac-dev@googlegroups.com. Visit this group at http://groups.google.com/group/trac-dev. For more options, visit https://groups.google.com/d/optout.