Opened 18 years ago
Closed 18 years ago
#3752 closed defect (fixed)
Unable to browse source in sub project
Reported by: | Owned by: | Christian Boos | |
---|---|---|---|
Priority: | normal | Milestone: | 0.9.7 |
Component: | version control | Version: | 0.9.6 |
Severity: | major | Keywords: | browse source timeline error |
Cc: | daniel.l@… | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Config We have a problem browsing the source on one of our sub projects. Currently we are running subversion with just one repository and all projects are stored in a hierarki. There are multiple Trac-config and just one Trac-installation. We are running:
- Apache/2.0.58 (Win32)
- SVN/1.4.0
- DAV/2
- mod_auth_sspi/1.0.4
- mod_ssl/2.0.58
- OpenSSL/0.9.8b
- mod_python/3.2.8
- Python/2.3.5
Problem During the night, access via Trac to the source is lost. When pressing "Browse source" the following error message is shown:
Trac detected an internal error: list.index(x): x not in list
Same thing happens when clicking on Timeline
(Python traceback for both errors is attached to this ticket)
Temporary workaround In trac.ini the following line defines the path to the project:
repository_dir = d:/www/svn/repository/customer/project/subproject/
d:/www/svn/repository is the path to the repository directory. In order to get it working temporarily i just delete "/customer/project/subproject/" and saves the ini-file. Browsing will now work although all customer's projects are now visible. Changing it back to "d:/www/svn/repository/customer/project/subproject/", the system then works as it intended to. The ini-file is exactly the same as before but the system is running without a problem until the next day. (I am not sure for how many hours the system is working but it is always broken in the morning.)
Attachments (5)
Change History (13)
by , 18 years ago
Attachment: | trac_error.txt added |
---|
comment:1 by , 18 years ago
Component: | general → version control |
---|---|
Milestone: | → 0.9.7 |
Owner: | changed from | to
Severity: | normal → major |
Can you try out this patch?
Index: trac/versioncontrol/cache.py =================================================================== --- trac/versioncontrol/cache.py (revision 3387) +++ trac/versioncontrol/cache.py (working copy) @@ -71,7 +71,10 @@ self.log.info("Syncing with repository (%s to %s)" % (youngest_stored, self.repos.youngest_rev)) if youngest_stored: - current_rev = self.repos.next_rev(youngest_stored) + try: + current_rev = self.repos.next_rev(youngest_stored) + except ValueError: + current_rev = int(youngest_stored) + 1 # for scoped repos. else: try: current_rev = self.repos.oldest_rev
In any case, support for scoped repositories has much improved since 0.9, so if you use this setup intensively as it seems, you should consider upgrading to 0.10.
comment:2 by , 18 years ago
Thank you for your quick response!
I have tried the patch. I am not exactly sure how I should apply it so I modified the file C:\Apache\Python\Lib\site-packages\trac\versioncontrol\cache.py. Was this correct?
The temp solution seems to have worked only for a short period of time today since the problem has already appeared again. After applying the patch there was no difference. I can try the temporary solution again and se for how long it holds. Attached is the error message and modified cache.py.
comment:3 by , 18 years ago
Ok, here's another attempt:
Index: svn_fs.py =================================================================== --- svn_fs.py (revision 3387) +++ svn_fs.py (working copy) @@ -308,9 +308,12 @@ return rev + 1 if rev == 0: return self.oldest_rev - idx = self.history.index(rev) - if idx > 0: - return self.history[idx - 1] + try: + idx = self.history.index(rev) + if idx > 0: + return self.history[idx - 1] + except ValueError: + return rev + 1 # for scoped repos. return None def rev_older_than(self, rev1, rev2):
(you can either leave the other change in place or revert it)
comment:4 by , 18 years ago
I am afraid it didn't help. I will try temp solution again to se if there is a difference. Attached is error log and sv_fs.py
comment:6 by , 18 years ago
Ok, forgot to restart apache i guess. It's done now and I'll get back to you weather it worked or not.
comment:7 by , 18 years ago
The system seems to be stable now. The second patch seems to have done the trick.
Thank you very much for a great support! We are looking forward to using the system for long time.
comment:8 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Python traceback