Opened 13 years ago
Closed 12 years ago
#765 closed enhancement (fixed)
[patch] add support for multiple repositories
Reported by: | David Kühling <dvdkhlng@…> | Owned by: | osimons |
---|---|---|---|
Priority: | major | Milestone: | 0.7 |
Component: | General | Version: | dev |
Keywords: | multi-repository | Cc: | |
Operating System: |
Description
Trac 0.12 supports multiple repositories per environment. When using multiple repositories, each one is assigned a name, to identify it in the Trac browser. These names are used like path prefixes so a trac URL "trac/browser/repo/a/b" may refer to path "/b" in a repository named "repo/a". The repository named "(default)" is used for paths not matching any of the repository names.
Bitten currently (as of r1010) only searches for paths in the repository named "(default)", i.e. does not support more than one repository.
Patches to add multi-repository support have been attached to ticket #342 (which is originally about DVCS branch-name issues) and where updated for 3 years now. Let's pull these patches into this new ticket. The latest, updated multi-repository patch against r1010 is attached.
Attachments (2)
Change History (8)
Changed 13 years ago by David Kühling <dvdkhlng@…>
comment:1 Changed 13 years ago by fbrettschneider@…
What is star * supposed to do in repository.py line 60?
href = req.href.browser(*resource.id, annotate=annotate, rev=resource.version)
Removing * seems to help.
But I also noticed that the master sends the revision number of the (Standard) repo instead of the proper revision number of the repo given by slave (repository.branch). Maybe this is reasoned by the * above, isn't it?
comment:2 Changed 13 years ago by falkb <fbrettschneider@…>
Replying to fbrettschneider@…:
But I also noticed that the master sends the revision number of the (Standard) repo instead of the proper revision number of the repo given by slave (repository.branch).
Now I've found out the wrong revision number was reasoned by a previous misconfiguration of my Bitten build configuration (see webinterface: Admin->Builds->Configuration->Manage Build Configurations):
- First I set the wrong repository "trunk" of the default repository and started the slave which got about 20000 builds scheduled.
- Then I noticed my mistake and aborted the slave after a few builds. But the scheduled number of builds (= 20000 minus a few) remain in the database.
- I corrected the repository path to "secondrepo/trunk" and started the slave again.
- But the slave still tried to process all the old (wrong) builds because they were scheduled first.
=> I solved this problem by removing the whole Build Configuration which clears the database from all records of it. Then I setup a new proper Build Configuration and now the patch works well for me also.
comment:3 Changed 12 years ago by anonymous
+1 for applying this patch
comment:4 Changed 12 years ago by hodgestar
- Owner set to hodgestar
If someone can add tests to the patch I'll look at landing it.
Changed 12 years ago by osimons
Updated patch for trunk, working for Trac 0.11 + 0.12 + 1.0 with all tests passing.
comment:5 Changed 12 years ago by osimons
- Owner changed from hodgestar to osimons
The patch has now increased from 22KB to 63KB in size... Full review with tweaks done, and particularly a lot of work getting all the Mock-based tests working correctly across all supported version.
Testing welcome. I'll apply for trunk if OK, but that will mean that 0.7 and 0.6 will finally part ways for good.
comment:6 Changed 12 years ago by osimons
- Resolution set to fixed
- Status changed from new to closed
With [1016] (including some further tweaks and fixed not part of latest patch) I think we can finally close this ticket. And, let's close if for good; new issues -> new tickets, please.
Add support for handling multiple repositories, properly interpreting paths prefixed with a repository name. This is the same as patch t342_multi_repos_r1010.patch from ticket #342.