Defect #5548

SVN Repository: Can not list content of a folder which includes square brackets.

Added by Xuan SONG over 7 years ago. Updated over 7 years ago.

Status:ClosedStart date:2010-05-18
Priority:NormalDue date:
Assignee:Eric Davis% Done:

100%

Category:SCM
Target version:1.0.0 (RC)
Resolution:Fixed Affected version:

Description

Operation:
1. Create a folder in SVN's repository. The folder's name includes square brackets, such as [dir1].
2. Add something (files and/or folders) into the folder created above.
3. Confirm them can be displayed correctly by SVN's client.
4. In Redmine's repository, click [dir1] to display its content.

After step4, the The entry or revision was not found in the repository. is displayed.

Environment:
1. Client(WinXP):TortoiseSVN
2. Server(RHEL5):CollabNet Subversion(1.6.6) + redmine(0.9.4) + Postgresql(8.4.3)

patch.diff Magnifier - test case and fix (38.4 KB) Gregor Schmidt, 2010-06-20 15:14

0001-adding-test-for-5548-square-brackets-in-svn-paths.patch Magnifier (35.4 KB) Gregor Schmidt, 2010-06-20 15:15

0002-fix-for-5548-escaping-in-svn-urls.patch Magnifier (3.71 KB) Gregor Schmidt, 2010-06-20 15:15

0003-updating-test-case-to-work-with-updated-svn-test-rep.patch Magnifier (1.23 KB) Gregor Schmidt, 2010-06-20 15:40

patch.diff Magnifier (39.2 KB) Gregor Schmidt, 2010-06-20 15:40

Associated revisions

Revision 3800
Added by Eric Davis over 7 years ago

Support listing directories in svn which include square brackets. #5548

Contributed by Gregor Schmidt

History

#1 Updated by Felix Schäfer over 7 years ago

  • Assignee deleted (Felix Schäfer)

I was able to reproduce this.

#2 Updated by ww yhy over 7 years ago

I have same problem.

SCM: Subversion
URL: http://10.121.120.15/svn/ChoSEE/src/mkend/src/
Login: wwyhy
Password: 123456

I got below error:

The entry or revision was not found in the repository.

#3 Updated by ww yhy over 7 years ago

ww yhy wrote:

I have same problem.

SCM: Subversion
URL: http://ip/svn/test/src/md/src/
Login: wwyhy
Password: 123456

I got below error:

The entry or revision was not found in the repository.

#4 Updated by Felix Schäfer over 7 years ago

  • Target version set to 1.0.0 (RC)

#5 Updated by Gregor Schmidt over 7 years ago

The basic problem seems to be an incompatibility of the URL RFC1738 and Ruby's URI.escape. The former assumes square brackets unsafe, the latter treats them as safe characters. Therefore they are not properly escaped when building the SVN URL.

I will try to add a failing test and add the necessary escaping.

#6 Updated by Gregor Schmidt over 7 years ago

In the mean time I have added a bug report to Ruby.

#7 Updated by Gregor Schmidt over 7 years ago

Attached you may find a patch adding a test case and a possible fix.

I had to change the svn test repository, so please regenerate it after applying the patch with

rm -fr tmp/test/subversion_repository
rake test:scm:setup:subversion

#8 Updated by Gregor Schmidt over 7 years ago

For those prefering git, here is the same patch in gits format-patch format.

#9 Updated by Gregor Schmidt over 7 years ago

Please note, that the fix breaks support for IPv6-Urls. But I think those are currently less likely to occur than square brackets.

IPv6 support may be fixed once Ruby issue #3457 is solved.

#10 Updated by Gregor Schmidt over 7 years ago

Another functional test was affected by the change in the test repository. Attached are updated patch files.

#11 Updated by Eric Davis over 7 years ago

  • Status changed from New to Closed
  • Assignee set to Eric Davis
  • % Done changed from 0 to 100
  • Resolution set to Fixed

Committed in r3800, thank you for the bug report and patch.

Also available in: Atom PDF