Blame (annotate) issue
|Reported by:||Emmanuel Blot||Owned by:||Christian Boos|
The newly introduced "annotate" feature (svn blame) is in trouble on my server.
Can't use blame annotator: svn blame failed: ("Can't read file '/tmp/tmp.tmp': End of file found", 70014)
The debug log contains the following lines:
2007-03-20 18:53:34,475 Trac[__init__] INFO: opening ra_local session to file:///local/svn/project/.../file.cpp 2007-03-20 18:53:35,268 Trac[__init__] WARNING: Can't use annotator 'blame': svn blame failed: ("Can't read file '/tmp/tmp.tmp': End of file found", 70014)
When I use the following code snippet (copied from the
svn_fs.py source), the annotate feature returns the list of revisions as expected and does not trigger any exception, using the same file and same revision as the
blame2 arguments. I also tried to run the code snippet with the same user as Apache (
www-data on Debian) and it also works:
from svn import core, client url = 'file:///local/svn/project/.../file.cpp' def svn_rev(num): value = core.svn_opt_revision_value_t() value.number = num revision = core.svn_opt_revision_t() revision.kind = core.svn_opt_revision_number revision.value = value return revision annotations =  def blame_receiver(line_no, revision, author, date, line, pool): annotations.append(revision) rev = svn_rev(2309) start = svn_rev(0) client.blame2(url, rev, start, rev, blame_receiver, client.create_context()) print annotations
I also run the
strace tool with this script and
/tmp/tmp.tmp file is also used (successfully).
As an additional note, the same Trac development version works ok with
tracd on Mac OS X.