#1830 closed defect (fixed)
Repository subsets have to be fully self contained
Reported by: | Jonas Borgström | Owned by: | Christian Boos |
---|---|---|---|
Priority: | normal | Milestone: | 0.10 |
Component: | version control | Version: | devel |
Severity: | normal | Keywords: | |
Cc: | gkokanosky@…, ndelon@…, dserodio@…, trac.tickets@…, calvin@…, jwilliams@…, trac@…, johannes_rudolph@… | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
When Trac is configured to use a repository subset it has to be fully self contained. It can not contain any resources copied or moved from parts of the repository that are outside of the configured subset.
See #586 for more information.
Attachments (2)
Change History (29)
comment:1 by , 19 years ago
Cc: | added |
---|
comment:2 by , 19 years ago
Cc: | added |
---|
comment:3 by , 19 years ago
comment:4 by , 19 years ago
Cc: | added |
---|
comment:6 by , 19 years ago
Cc: | added |
---|
comment:7 by , 19 years ago
What's holding this patch from being applied to the trunk? Any pitfalls?
comment:8 by , 19 years ago
Cc: | added |
---|
comment:9 by , 19 years ago
The attached patch didn't solve my problem: my project was renamed, so the whole "repository subset" was moved.
comment:10 by , 19 years ago
Cc: | added |
---|
comment:11 by , 19 years ago
Component: | general → version control |
---|---|
Owner: | changed from | to
comment:13 by , 19 years ago
Milestone: | → 0.10 |
---|---|
Owner: | changed from | to
Perhaps, but that's far from being enough…
Our own test repos
can be used to exercise this situation, when repository_dir
uses the tags/v1
for its scope.
The only available changeset is 7, and the browser view and the changeset view
will fail (the revision log will work, though).
comment:14 by , 19 years ago
Damn, I spoke too soon. To workaround this bug, I had set the problematic project's repository_dir
to the repository root. Now that I've pointed it back to a subset of the repository, it's happening again, both in the Changeset view and in the Browser view too.
In the Changeset view, the error is:
Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/trac/web/modpython_frontend.py", line 208, in handler dispatch_request(mpr.path_info, mpr, env) File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 141, in dispatch_request dispatcher.dispatch(req) File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 109, in dispatch resp = chosen_handler.process_request(req) File "/usr/lib/python2.3/site-packages/trac/versioncontrol/web_ui/changeset.py", line 216, in process_request diff_args, diff_options) File "/usr/lib/python2.3/site-packages/trac/versioncontrol/web_ui/changeset.py", line 425, in _render_html diffs = _content_changes(old_node, new_node) File "/usr/lib/python2.3/site-packages/trac/versioncontrol/web_ui/changeset.py", line 382, in _content_changes data = old_node.get_content().read() AttributeError: 'NoneType' object has no attribute 'read'
and in the Browser view:
No changeset 1162 in the repository
I'm using r2865
comment:15 by , 19 years ago
Cc: | added |
---|
comment:16 by , 19 years ago
Cc: | added |
---|
comment:17 by , 19 years ago
Cc: | added; removed |
---|
comment:18 by , 19 years ago
Status: | new → assigned |
---|
The support for this feature made some progress: Please test r2992.
That changeset is on the VcRefactoring branch, but the corresponding diff should also apply cleanly on the source:trunk@2991.
comment:19 by , 19 years ago
I tried this, as suggested merging the diff from the VcRefactoring branch onto source:trunk@2991
Applied cleanly, testing with tracd.
Point it at the test repo that is created by my script posted to trac list in February:
http://lists.edgewall.com/archive/trac/2006-February/006655.html
(trac-bug-1830.sh script added as attachment)
If I point svn_repository to repo/subdir, I can at least browse to the (virtual) root - this is an improvement on before.
However, attempt to browse to a subdirectory within the subset repo, I get the following oops:
Traceback (most recent call last): File "/home/jwilliams/tmp/trac-test/trac-install/lib/python2.3/site-packages/trac/web/main.py", line 283, in dispatch_request dispatcher.dispatch(req) File "/home/jwilliams/tmp/trac-test/trac-install/lib/python2.3/site-packages/trac/web/main.py", line 170, in dispatch resp = chosen_handler.process_request(req) File "/home/jwilliams/tmp/trac-test/trac-install/lib/python2.3/site-packages/trac/versioncontrol/web_ui/browser.py", line 106, in process_request self._render_directory(req, repos, node, rev) File "/home/jwilliams/tmp/trac-test/trac-install/lib/python2.3/site-packages/trac/versioncontrol/web_ui/browser.py", line 137, in _render_directory changes = get_changes(self.env, repos, [i['rev'] for i in info]) File "/home/jwilliams/tmp/trac-test/trac-install/lib/python2.3/site-packages/trac/versioncontrol/web_ui/util.py", line 36, in get_changes except NoSuchChangeset: NameError: global name 'NoSuchChangeset' is not defined
by , 19 years ago
Attachment: | trac-bug-1830.sh added |
---|
Minimal test case of subset repo problem to demonstrate the problem.
comment:20 by , 19 years ago
oops, you need the small fix of r3009.
I'll try also with your repo later.
comment:21 by , 19 years ago
Browsing the test repo works fine now, but for that you'll need to upgrade your trunk to r3010, which contains an important fix for scoped repositories.
comment:22 by , 19 years ago
Hmm, still not working for me - maybe I'm missing something. Here's what I tried
Clean test of trunk@3010:
$ svn update -r3010 $ svn revert -R * $ rm -rf /home/jwilliams/tmp/trac-test/trac-install $ python ./setup install --prefix=/home/jwilliams/tmp/trac-test/trac-install $ export PATH=/home/jwilliams/tmp/trac-test/trac-install/bin:${PATH} $ export PYTHONPATH=/home/jwilliams/tmp/trac-test/trac-install/lib/python2.3/site-packages:${PYTHONPATH} $ svn-admin /home/jwilliams/trac-test/testrepo resync $ tracd -p 10000 /home/jwilliams/tmp/trac-test/trac-instance
With trac.ini
pointing to test-repo/subdir, when I attempt to browse 'b', I get
Internal Error No changeset 3 in the repository
If merge the changes in the VcRefactoring branch, r2991:2992, and repeat, I get the following oops:
Traceback (most recent call last): File "/home/jwilliams/tmp/trac-test/trac-install/lib/python2.3/site-packages/trac/web/main.py", line 283, in dispatch_request dispatcher.dispatch(req) File "/home/jwilliams/tmp/trac-test/trac-install/lib/python2.3/site-packages/trac/web/main.py", line 170, in dispatch resp = chosen_handler.process_request(req) File "/home/jwilliams/tmp/trac-test/trac-install/lib/python2.3/site-packages/trac/versioncontrol/web_ui/browser.py", line 106, in process_request self._render_directory(req, repos, node, rev) File "/home/jwilliams/tmp/trac-test/trac-install/lib/python2.3/site-packages/trac/versioncontrol/web_ui/browser.py", line 137, in _render_directory changes = get_changes(self.env, repos, [i['rev'] for i in info]) File "/home/jwilliams/tmp/trac-test/trac-install/lib/python2.3/site-packages/trac/versioncontrol/web_ui/util.py", line 36, in get_changes except NoSuchChangeset: NameError: global name 'NoSuchChangeset' is not defined
Can you confirm, whether simply r3010 on trunk should work, or if it's r3010 on trunk plus r2991:2992 on VcRefactoring that's required?
Here is an excerpt of my trac.ini file, for reference:
[trac] default_charset = iso-8859-15 ignore_auth_case = false permission_store = DefaultPermissionStore check_auth_ip = true database = sqlite:db/trac.db templates_dir = /opt/local/share/trac/templates default_handler = WikiModule metanav = login,logout,settings,help,about mainnav = wiki,timeline,roadmap,browser,tickets,newticket,search repository_type = svn repository_dir = /home/jwilliams/trac-test/test-repo/subdir }
comment:23 by , 19 years ago
trac.ini excerpt, previewed this time!
[trac] default_charset = iso-8859-15 ignore_auth_case = false permission_store = DefaultPermissionStore check_auth_ip = true database = sqlite:db/trac.db templates_dir = /opt/local/share/trac/templates default_handler = WikiModule metanav = login,logout,settings,help,about mainnav = wiki,timeline,roadmap,browser,tickets,newticket,search repository_type = svn repository_dir = /home/jwilliams/trac-test/test-repo/subdir
comment:24 by , 19 years ago
Sorry, the instructions were not clear enough:
- upgrade to source:trunk@3010
- on top of this, apply the last two VcRefactoring changesets, i.e. r2992 and r3009 (i.e. diff:sandbox/vc-refactoring@2991:3009
Note: that diff: link will work when this trac will be switched to 0.10)
comment:25 by , 19 years ago
Fantastic! Works beautifully on the test repo and also our production repo.
Thanks for your efforts - much appreciated.
comment:26 by , 19 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Merged in r3015. For those who are interested in the feature and haven't done so yet, please test!
If you discover some new issues with the above, please create a new ticket.
comment:27 by , 18 years ago
Cc: | added; removed |
---|
Here is a patch that can solve this issue:
Despite this patch seems to work correctly, I'm not sure that this the good way to fix the copy/move issue.