Opened 18 years ago
Closed 15 years ago
#1040 closed enhancement (fixed)
support for multiple repos
Reported by: | Owned by: | Herbert Valerio Riedel | |
---|---|---|---|
Priority: | high | Component: | GitPlugin |
Severity: | minor | Keywords: | |
Cc: | Tim Olsen | Trac Release: | 0.12 |
Description
Hi, I'm currently trying the git plugin for the first time. Is it possible to include multiple git repositories? Will it ever be possible? I have this situation:
/var/git/project1.git /var/git/project2.git /var/git/project3.git
but it would be convenient to have one trac site for all these projects. Is this a good idea?
Attachments (1)
Change History (25)
comment:1 follow-up: 3 Changed 18 years ago by
Priority: | low → high |
---|
comment:2 follow-up: 4 Changed 17 years ago by
if you want to have multiple repostories per Trac environment, you'll have to wait for trac:MultipleRepositorySupport
for now you have to create one Trac environment per git repository...
comment:3 Changed 17 years ago by
Replying to anonymous:
It would seem this project supports multiple repos:
Apart from that link now being apparently broken, they seem to be using the GitwebPlugin.
comment:4 follow-up: 5 Changed 17 years ago by
Replying to hvr:
if you want to have multiple repostories per Trac environment, you'll have to wait for trac:MultipleRepositorySupport
for now you have to create one Trac environment per git repository...
What about combining your git repositories in a super-repository using submodules? Would that work? See http://git.or.cz/gitwiki/GitSubmoduleTutorial for details on setting up a super-repository.
comment:5 follow-up: 6 Changed 17 years ago by
Replying to olaf.meeuwissen@avasys.jp:
What about combining your git repositories in a super-repository using submodules? Would that work? See http://git.or.cz/gitwiki/GitSubmoduleTutorial for details on setting up a super-repository.
I doubt that GitPlugin right now properly supports submodules yet (I haven't tested it yet, and I expect issues)
comment:6 follow-up: 9 Changed 17 years ago by
Replying to hvr:
Replying to olaf.meeuwissen@avasys.jp:
What about combining your git repositories in a super-repository using submodules? Would that work? See http://git.or.cz/gitwiki/GitSubmoduleTutorial for details on setting up a super-repository.
I doubt that GitPlugin right now properly supports submodules yet (I haven't tested it yet, and I expect issues)
indeed ,the error is
internal error (got unexpected object kind 'commit')
comment:7 Changed 16 years ago by
Cc: | Tim Olsen added; anonymous removed |
---|
comment:9 Changed 16 years ago by
This one works for me: http://www.kernel.org/pub/software/scm/git/docs/howto/using-merge-subtree.html
Just some little drawbacks: The repository the subprojects are imported into must not be empty. I had to make an initial commit with a dummy file which also appears in the revision history.
comment:10 follow-up: 11 Changed 16 years ago by
So, I tried using the MultipleRepos branch of .12 with git plugin. http://svn.edgewall.com/repos/trac/sandbox/multirepos
Everything works for the most part it seems (surprisingly), aside from when going to a changeset the links to the parent in the non-default repository tries to go to the repository path such as
Parents: a2e0f4c40330a9e197bd44dce2f28c6ca059075f
Changed 16 years ago by
Attachment: | trac-gitplugin-fix-changeset-error.patch added |
---|
Fix changeset error and make it work on the multirepo branch
comment:11 follow-up: 14 Changed 16 years ago by
Trac Release: | 0.10 → 0.11 |
---|
Above patch should fix the issue encountered in above comment.
Now gitplugin appears to work nicely with multiple repositories. :)
comment:12 Changed 16 years ago by
hi , does that patch is for version 0.11 of trac or 0.12? and how can i use that? i mean what should i have in my trac.ini to use multi repo?
comment:14 Changed 16 years ago by
Replying to anonymous:
Above patch should fix the issue encountered in above comment.
Now gitplugin appears to work nicely with multiple repositories. :)
yep works very well here (Trac 0.12multirepos-r8245)
ty!
comment:15 Changed 16 years ago by
I'm getting the following error against 0.12multirepos rev 8345.
Trac detected an internal error: AttributeError: components
File "/usr/lib/python2.4/site-packages/Trac-0.12multirepos-py2.4.egg/trac/web/main.py", line 467, in _dispatch_request dispatcher.dispatch(req) File "/usr/lib/python2.4/site-packages/Trac-0.12multirepos-py2.4.egg/trac/web/main.py", line 212, in dispatch resp = chosen_handler.process_request(req) File "/usr/lib/python2.4/site-packages/Trac-0.12multirepos-py2.4.egg/trac/versioncontrol/web_ui/browser.py", line 372, in process_request repo_data = self._render_repository_index( File "/usr/lib/python2.4/site-packages/Trac-0.12multirepos-py2.4.egg/trac/versioncontrol/web_ui/browser.py", line 452, in _render_repository_index youngest = repos.get_changeset(repos.youngest_rev) File "/usr/lib/python2.4/site-packages/Trac-0.12multirepos-py2.4.egg/trac/versioncontrol/api.py", line 712, in <lambda> youngest_rev = property(lambda x: x.get_youngest_rev()) File "/usr/lib/python2.4/site-packages/Trac-0.12multirepos-py2.4.egg/trac/versioncontrol/cache.py", line 312, in get_youngest_rev return self.metadata.get().get(CACHE_YOUNGEST_REV) File "/usr/lib/python2.4/site-packages/Trac-0.12multirepos-py2.4.egg/trac/cache.py", line 106, in get return CacheManager(self.env).get(self.id, self.retriever, db) File "/usr/lib/python2.4/site-packages/Trac-0.12multirepos-py2.4.egg/trac/core.py", line 150, in __new__ self = compmgr.components.get(cls) File "/usr/lib/python2.4/site-packages/Trac-0.12multirepos-py2.4.egg/trac/db/util.py", line 93, in __getattr__ return getattr(self.cnx, name) File "/usr/lib/python2.4/site-packages/Trac-0.12multirepos-py2.4.egg/trac/db/util.py", line 93, in __getattr__ return getattr(self.cnx, name) File "/usr/lib64/python2.4/site-packages/sqlite/main.py", line 580, in __getattr__ raise AttributeError, key
I also get the following error when running resync
# trac-admin /data/projects/sysadmin/ repository resync "*" Resyncing repository history for haw... AttributeError: get_db_cnx Traceback (most recent call last): File "/usr/lib64/python2.4/logging/__init__.py", line 737, in emit self.stream.write(fs % msg) ValueError: I/O operation on closed file
Any ideas on how I could fix this up?
comment:17 Changed 15 years ago by
Note that there's an upcoming API change on Trac:MultiRepos, we're going away from composite (reponame,id)
for changeset and source resource and we will instead make them subresource of a Resource('repository', reponame)
resource. See #T7706.
comment:18 Changed 15 years ago by
Trac Release: | 0.11 → 0.12 |
---|
comment:19 Changed 15 years ago by
With Multirepos r9085 I get:
2010-01-27 17:24:07,698 Trac[chrome] ERROR: Error with navigation contributor BrowserModule: TypeError: 'NoneType' object is unsubscriptable
comment:20 follow-ups: 21 23 Changed 15 years ago by
Well, I guess a 0.12 branch of that plugin is really needed at this point...
comment:21 Changed 15 years ago by
Replying to cboos:
Well, I guess a 0.12 branch of that plugin is really needed at this point...
I've started working on a port of this to 0.12 at http://github.com/lentil/trac-git-plugin.
Currently the cached_repository
is still not working, but with that option disabled it seems to be OK. Feel free to pull this into a new 0.12 branch if that's any help.
comment:22 Changed 15 years ago by
I went ahead and added a ticket with the above patch -- #6554. Hopefully it will be of some use.
Cheers, Kevin
comment:23 Changed 15 years ago by
Replying to cboos:
Well, I guess a 0.12 branch of that plugin is really needed at this point...
there is now :-)
comment:25 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
It would seem this project supports multiple repos:
http://dev.laptop.org/git.do?p=projects/trac-git;a=summary