Issue #290 resolved

Commit with svnkit fails if the path contains spaces

Sebastian Sdorra
repo owner created an issue

Comments (5)

  1. Sebastian Sdorra reporter
    • changed status to open

    The error occurs on native svn too. Here is a short script to reproduce the issue:

    URL=http://localhost:8081/scm/svn/issue
    FOLDER=repo
    FILE="file with spaces"
    
    svn co $URL $FOLDER
    cd $FOLDER
    echo a > $FILE
    svn add $FILE
    svn commit -m 'added $FILE'
    echo b >> $FILE
    svn commit -m 'modify $FILE'
    

    The first commit works without a problem, but the second commit fails with message:

    svn: Commit failed (details follow):
    svn: Server sent unexpected return value (400 Bad Request) in response to CHECKOUT request for '/scm/svn/issue/!svn/ver/1/file with spaces'
    
  2. Sebastian Sdorra reporter

    The problem comes from the merge method, the checked-in href have to be url encoded.

    Output of scm-manager:

    <D:checked-in>
      <D:href>/scm/svn/issue/!svn/ver/1/file with spaces</D:href>
    </D:checked-in>
    

    Correct output:

    <D:checked-in>
      <D:href>/scm/svn/issue/!svn/ver/1/file%20with%20spaces</D:href>
    </D:checked-in>
    

    This problem comes definitely from issue #282.

  3. Log in to comment