Ticket #4830 (closed defect: fixed)
node = repository.has_node( path, repository.youngest_rev ) worked in trac 10.1 busted in 10.3
| Reported by: | edunne | Owned by: | cboos |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.10.4 |
| Component: | version control | Version: | 0.10.3 |
| Severity: | normal | Keywords: | svn |
| Cc: |
Description (last modified by cboos) (diff)
I'm loggin this as a defect, although I'm not entirely sure it is as TRAC seems to work fine, but something changed between trac 10.1 and trac 10.3 in the TRAC api.
I wrote a plugin for trac and this used to work in trac 10.1. In Trac 10.3 this call pukes and says long expected instead recieved a unicode character. The thing is I'm using the constants as provided by the TRAC api, so I don't know why this should blow up.
I suppose I can cast the second arguement to a long( repository.youngest_rev) but this seem a bit odd to do.
If I try and not give the revision argument and let the rev equal it's default arg of rev=None the call pukes saying 3 args expected.
I've included both stack traces. I'm not entirely sure what changed between 10.1 and 10.3. I'm stumped on this. Potentially I'm just using the TRAC api incorrectly.
Traceback (most recent call last):
File "C:\Python24\Lib\site-packages\trac\web\main.py", line 387, in dispatch_request
dispatcher.dispatch(req)
File "C:\Python24\Lib\site-packages\trac\web\main.py", line 237, in dispatch
resp = chosen_handler.process_request(req)
File "build\bdist.win32\egg\testManagementPlugin\testManager.py", line 83, in process_request
File "build\bdist.win32\egg\testManagementPlugin\testRuns.py", line 40, in process_testmanager_request
File "build\bdist.win32\egg\testManagementPlugin\properties.py", line 47, in hasTestCases
File "C:\Python24\Lib\site-packages\trac\versioncontrol\cache.py", line 110, in has_node
return self.repos.has_node(path, rev)
File "C:\Python24\Lib\site-packages\trac\versioncontrol\svn_fs.py", line 319, in has_node
rev_root = fs.revision_root(self.fs_ptr, rev, pool())
File "C:\Python24\Lib\site-packages\libsvn\fs.py", line 218, in svn_fs_revision_root
return apply(_fs.svn_fs_revision_root, args)
TypeError: argument number 2: a 'long' is expected, 'unicode(1)' is received
second stack trace:
Traceback (most recent call last):
File "C:\Python24\Lib\site-packages\trac\web\main.py", line 387, in dispatch_request
dispatcher.dispatch(req)
File "C:\Python24\Lib\site-packages\trac\web\main.py", line 237, in dispatch
resp = chosen_handler.process_request(req)
File "c:\python24\lib\site-packages\testManagementPlugin-0.0.2-py2.4.egg\testManagementPlugin\testManager.py", line 83, in process_request
template, content_type = pageProvider.process_testmanager_request( req )
File "c:\python24\lib\site-packages\testManagementPlugin-0.0.2-py2.4.egg\testManagementPlugin\testRuns.py", line 40, in process_testmanager_request
hasTestCases, path = self.properties.hasTestCases( self, req )
File "c:\python24\lib\site-packages\testManagementPlugin-0.0.2-py2.4.egg\testManagementPlugin\properties.py", line 45, in hasTestCases
return repository.has_node( testcasePath ), testcasePath
TypeError: has_node() takes exactly 3 arguments (2 given)


