Guest?
 
Project
SVNKit
Priority
Normal
Type
Bug
State
Submitted
Assignee
Dmitry Pavlenko
Subsystem
Unknown subsystem
Affected versions
1.7.6
Fix versions
No Fix versions
Fixed in build
No Fixed in build
  • Created by   Sebastian Sdorra
    6 months ago (20 Nov 2012 21:10)
  • Updated by   Sebastian Sdorra
    6 months ago (21 Nov 2012 16:54)
0
Issue is visible to: All Users
  The issue is visible to the selected user group only
Svnkit-dav return the wrong path for the REPORT method with mergeinfo-report, if the path is empty. For example:

svn client request (tested with native svn 1.7.7):

REPORT /scm/svn/issue-280/!svn/bc/5/branches/stable HTTP/1.1.

<S:mergeinfo-report xmlns:S="svn:">
  <S:revision>5</S:revision>
  <S:inherit>inherited</S:inherit>
  <S:path></S:path>
</S:mergeinfo-report>


Response of svnkit-dav:

<S:mergeinfo-report xmlns:D="DAV:" xmlns:S="svn:">
  <S:mergeinfo-item>
    <S:mergeinfo-path>/branches/stable</S:mergeinfo-path>
    <S:mergeinfo-info>/trunk:3-4</S:mergeinfo-info>
  </S:mergeinfo-item>
</S:mergeinfo-report>


The response does not contain the empty path of the request. Here is the output from mod_dav_svn:

<S:mergeinfo-report xmlns:D="DAV:" xmlns:S="svn:">
  <S:mergeinfo-item>
    <S:mergeinfo-path></S:mergeinfo-path>
    <S:mergeinfo-info>/trunk:3-4</S:mergeinfo-info>
  </S:mergeinfo-item>
</S:mergeinfo-report>
Comments (3)
 
History
 
Linked Issues (?)
 
TeamCity Changes (0)
 
Sebastian Sdorra
  Sebastian Sdorra
20 Nov 2012 21:13
6 months ago
I've created a patch to fix this problem. See attachment svnkit-dav.patch.
Related Attachments
Dmitry Pavlenko
  Dmitry Pavlenko
21 Nov 2012 16:28
6 months ago
If think the whole cycle
        for (int i = 0; i < getMergeInfoRequest().getTargetPaths().length; i++) {
            String currentPath = getMergeInfoRequest().getTargetPaths()[i];
            DAVPathUtil.testCanonical(currentPath);
            if (currentPath.length() == 0 || currentPath.charAt(0) != '/') {
                getMergeInfoRequest().getTargetPaths()[i] = SVNPathUtil.append(getDAVResource().getResourceURI().getPath(), currentPath);
            }
        }


should be just removed instead. In mod_dav_svn there's no such logic.

The cycle was introduced at r3483 and added to 2 handlers: DAVMergeInfoHandler and DAVLogHandler. I suspect that the change of the revision has been done mostly to make DAVLogHandler return absolute paths (as it should always return absolute paths), and DAVMergeInfoHandler was "fixed" just because it's a handler too.

I'll talk to r3483's author and, if he agrees, will remove this cycle.

Anyway thanks for the patch!
Sebastian Sdorra
  Sebastian Sdorra
21 Nov 2012 16:54
6 months ago
Removing the complete cycle results in a wrong response:

<?xml version="1.0" encoding="UTF-8"?>
<S:mergeinfo-report xmlns:D="DAV:" xmlns:S="svn:">
</S:mergeinfo-report>


I think svnkit-dav has to use the request uri, if the path element of the request is empty and that is what the cycle above does.
Apply Command

Command Preview: