#10386 closed defect (fixed)
Cannot annotate/blame a file with filename containing %25 (/) escapes
Reported by: | Owned by: | Jun Omae | |
---|---|---|---|
Priority: | normal | Milestone: | 0.12.6 |
Component: | version control/browser | Version: | 0.12-stable |
Severity: | minor | Keywords: | svn blame |
Cc: | Jun Omae | Branch: | |
Release Notes: |
Fix subversion blame not working for path contained urlencoded characters, e.g. |
||
API Changes: | |||
Internal Changes: |
Description
If a file named abc%25def is stored under version control then Trac is unable to annotate that file. The url linked form the file browser is http://localhost:8000/trac-env/browser/abc%25def
. The file can be viewed, but if blame is attempted by visiting http://localhost:8000/trac-env/browser/abc%25def?annotate=blame
the error
Warning: Can't use blame annotator: svn blame failed on DefineGuide%2FDefineWiki: ("'/svn-repo/abc/def' is not a file in revision 1", 160017)
The contents of the file are displayed, but the rev column is blank.
OS: Ubuntu 10.04 x86 Python: 2.6.5 Database: Sqlite 3.6.22 VCS: Subversion 1.6.6 Trac: 0.12.3dev-r10806
Attachments (0)
Change History (13)
comment:1 by , 12 years ago
Milestone: | → undecided |
---|
comment:2 by , 11 years ago
Milestone: | undecided → 1.0.2 |
---|---|
Owner: | set to |
Status: | new → assigned |
comment:4 by , 11 years ago
Milestone: | 1.0.2 → 0.12.6 |
---|
comment:5 by , 11 years ago
Proposed changes in jomae.git@t10386_0.12 and jomae.git@t10386.
Verified with the following environments.
- Linux: Subversion 1.7.6 on Python 2.4 - 2.7
- Linux: Subversion 1.6.11 on Python 2.4 - 2.7
- Windows: Subversion 1.7.13 on Python 2.6
follow-up: 7 comment:6 by , 11 years ago
Looks good. On Ubuntu 13.04 I can reproduce the issue with a filename containing %2F
, but not %25
.
Tested with SVN 1.8.8 and Python 2.7 on Linux. Someday I'll get the SVN bindings installed correctly for Python 2.5 and 2.6 so that I can test with those version.
comment:7 by , 11 years ago
Keywords: | jomae added |
---|
Replying to rjollos:
Looks good. On Ubuntu 13.04 I can reproduce the issue with a filename containing
%2F
, but not%25
.
Does that mean %25
cannot lead this issue? I consider that all %
with 2 hex-characters, e.g. %30
, %00
, should lead.
C:> svnadmin create C:\usr\var\svn\t10386 C:> svnadmin load C:\usr\var\svn\t10386 < tracopt\versioncontrol\svn\tests\svnrepos.dump ... C:> C:\usr\src\trac\venv\svn18-py27\Scripts\python.exe Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> from svn import core >>> core.SVN_VERSION '1.8.8 (r1568071)' >>> from trac.env import Environment >>> env = Environment(r'C:\usr\var\trac\1.0') >>> repos = env.get_repository('t10386') >>> node = repos.get_node('branches/t10386/READ%25ME.txt') >>> node.get_annotations() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "tracopt\versioncontrol\svn\svn_fs.py", line 848, in get_annotations path=self.path, error=to_unicode(e))) trac.core.TracError: svn blame failed on branches/t10386/READ%25ME.txt: 150000 - 'file:///C:/usr/var/svn/t10386/branches/t10386/READ%25ME.txt' does not exist in revision 29
Verified that unit tests pass with Subversion 1.8.8 on Python 2.6 for Windows.
comment:8 by , 11 years ago
Cc: | added |
---|---|
Keywords: | jomae removed |
comment:9 by , 11 years ago
Owner: | removed |
---|---|
Status: | assigned → new |
comment:10 by , 11 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
I'll push the changes after verifying with repository directory included unicode characters on both Linux and Windows.
comment:11 by , 11 years ago
Keywords: | svn added |
---|---|
Release Notes: | modified (diff) |
Resolution: | → fixed |
Status: | assigned → closed |
comment:12 by , 10 years ago
Component: | version control → version control/browser |
---|
comment:13 by , 10 years ago
Keywords: | blame added |
---|
All the tickets for {20} from last year have probably been seen multiple times by now, yet are still to be triaged…