Problem with file name encoding during merge - URL Encoding (Percent Encoding)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with file name encoding during merge - URL Encoding (Percent Encoding)

Bartosz Pierzchlewicz
Hi,
We have subversion server in version 1.9.4-1ubuntu1 (apache, 2.4.18-2ubuntu4.1).

Clients connect via http protocol.

We have problems with filename encoding (not its content) during merge process.

It is probably server configuration issue, because we encounter this problem on Windows and Linux machines using different client libraries.

Steps to reproduce:

svn checkout http://path.svn/trunk
svn copy http://path.svn/trunk         http://path.svn/branches/1.0 -m "create branch 1.0"
svn switch http://path.svn/branches/1.0 trunk
svn add "trunk\file With Space.txt"
svn commit -m "Add file with space" trunk
svn switch http://path.svn/trunk trunk
svn merge -c3  http://path.svn/branches/1.0 trunk
svn commit -m "Commit After Merge" trunk

svn log http://path.svn/ -r4 -v

Changed paths:
   M /trunk
   A /trunk/file%20With%20Space.txt (from /branches/1.0/file With Space.txt:3)

As You can see file created by merge has name 'file%20With%20Space.txt' instead 'file With Space.txt'.
File names are changed by URL Encoding (Percent Encoding).

Bartosz Pierzchlewicz
Reply | Threaded
Open this post in threaded view
|

Re: Problem with file name encoding during merge - URL Encoding (Percent Encoding)

Daniel Shahaf-2
Bartosz Pierzchlewicz wrote on Thu, 05 Oct 2017 12:38 +0000:

> svn checkout http://path.svn/trunk
> svn copy http://path.svn/trunk         http://path.svn/branches/1.0 -m "create branch 1.0"
> svn switch http://path.svn/branches/1.0 trunk
> svn add "trunk\file With Space.txt"
> svn commit -m "Add file with space" trunk
> svn switch http://path.svn/trunk trunk
> svn merge -c3  http://path.svn/branches/1.0 trunk
> svn commit -m "Commit After Merge" trunk
>
> svn log http://path.svn/ -r4 -v
>
> Changed paths:
>    M /trunk
>    A /trunk/file%20With%20Space.txt (from /branches/1.0/file With Space.txt:3)
>
> As You can see file created by merge has name 'file%20With%20Space.txt' instead 'file With Space.txt'.
> File names are changed by URL Encoding (Percent Encoding).

I don't understand which of two possible anomalies you're seeing.

The filename should be "file With Space.txt" both on-disk and in the
output of 'svn log -v'.

Is the file called "file With Space.txt" or "file%20With%20Space.txt" on
disk?  (Run '/bin/ls trunk' after the 'merge -c3' and before the commit)

Thanks,

Daniel
Reply | Threaded
Open this post in threaded view
|

RE: Problem with file name encoding during merge - URL Encoding (Percent Encoding)

Bartosz Pierzchlewicz
Hi Daniel,
After merge to trunk, file on disk has proper name: "file With Space.txt".
Moreover after commit, file on my disk still has proper name,
but when I Checkout to other directory it will have name 'file%20With%20Space.txt'.

Log after second commit says exactly what was happened:

A /trunk/file%20With%20Space.txt (from /branches/1.0/file With Space.txt:3)

File in trunk was created from file in branch, but the filename was changed.
This is unwanted behavior.

Bartosz

Reply | Threaded
Open this post in threaded view
|

Re: Problem with file name encoding during merge - URL Encoding (Percent Encoding)

Johan Corveleyn-3
On Fri, Oct 6, 2017 at 8:45 AM, Bartosz Pierzchlewicz
<[hidden email]> wrote:

> Hi Daniel,
> After merge to trunk, file on disk has proper name: "file With Space.txt".
> Moreover after commit, file on my disk still has proper name,
> but when I Checkout to other directory it will have name 'file%20With%20Space.txt'.
>
> Log after second commit says exactly what was happened:
>
> A /trunk/file%20With%20Space.txt (from /branches/1.0/file With Space.txt:3)
>
> File in trunk was created from file in branch, but the filename was changed.
> This is unwanted behavior.

Yes, this seems unwanted. But where did it go wrong? At this point
it's unclear whether this is a user error, or some tool / UI on top of
SVN that did something wrong, or SVN itself.

Can you check with the person who performed that commit, to see
exactly what he did? What svn operation? With what tool (and which
version of the tool)?

--
Johan
Reply | Threaded
Open this post in threaded view
|

RE: Problem with file name encoding during merge - URL Encoding (Percent Encoding)

Bartosz Pierzchlewicz
Dear Johan,
at my first e-mail I wrote EXACTLY what to do to reproduce error.
In my opinion this is low chance to blame client library.
We tried two different compilation of 'pure svn' on Windows, and as third: TortoiseSVN client.
Moreover we also tried to reproduce this on Linux machine.

I suppose that this may be connected with http transport, or apache/WebDAV or svn server, because when I create repo on locally and use file:/// transport, then everything is ok.

Bartosz


-----Original Message-----
From: Johan Corveleyn [mailto:[hidden email]]
Sent: Friday, October 6, 2017 1:30 PM
To: Bartosz Pierzchlewicz
Cc: [hidden email]
Subject: Re: Problem with file name encoding during merge - URL Encoding (Percent Encoding)

On Fri, Oct 6, 2017 at 8:45 AM, Bartosz Pierzchlewicz <[hidden email]> wrote:

> Hi Daniel,
> After merge to trunk, file on disk has proper name: "file With Space.txt".
> Moreover after commit, file on my disk still has proper name, but when
> I Checkout to other directory it will have name 'file%20With%20Space.txt'.
>
> Log after second commit says exactly what was happened:
>
> A /trunk/file%20With%20Space.txt (from /branches/1.0/file With
> Space.txt:3)
>
> File in trunk was created from file in branch, but the filename was changed.
> This is unwanted behavior.

Yes, this seems unwanted. But where did it go wrong? At this point it's unclear whether this is a user error, or some tool / UI on top of SVN that did something wrong, or SVN itself.

Can you check with the person who performed that commit, to see exactly what he did? What svn operation? With what tool (and which version of the tool)?

--
Johan
Reply | Threaded
Open this post in threaded view
|

Re: Problem with file name encoding during merge - URL Encoding (Percent Encoding)

Daniel Shahaf-2
I can't reproduce your problem using a trunk client and httpd-2.4.25 on Linux.

Is there any http proxy or reverse proxy in your setup?
Reply | Threaded
Open this post in threaded view
|

RE: Problem with file name encoding during merge - URL Encoding (Percent Encoding)

Bert Huijben-5


> -----Original Message-----
> From: Daniel Shahaf [mailto:[hidden email]]
> Sent: vrijdag 6 oktober 2017 16:24
> To: Bartosz Pierzchlewicz <[hidden email]>;
> [hidden email]
> Subject: Re: Problem with file name encoding during merge - URL Encoding
> (Percent Encoding)
>
> I can't reproduce your problem using a trunk client and httpd-2.4.25 on Linux.
>
> Is there any http proxy or reverse proxy in your setup?

That could cause some issues. Some specific bad httpd versions or selective backports of those 'fixes' could do that too... But I wouldn’t be surprised to see some of these issues with Subversion 1.6 or earlier under some specific circumstances. We didn't have all these nice url and path helper functions with strictly defined behavior in those older releases.

        Bert

Reply | Threaded
Open this post in threaded view
|

RE: Problem with file name encoding during merge - URL Encoding (Percent Encoding)

Bartosz Pierzchlewicz
In reply to this post by Daniel Shahaf-2
Yes,
It was proxy between svn service and clients.

Thanks a lot for giving me this hint!

Bartosz Pierzchlewicz

-----Original Message-----
From: Daniel Shahaf [mailto:[hidden email]]
Sent: Friday, October 6, 2017 4:24 PM
To: Bartosz Pierzchlewicz; [hidden email]
Subject: Re: Problem with file name encoding during merge - URL Encoding (Percent Encoding)

I can't reproduce your problem using a trunk client and httpd-2.4.25 on Linux.

Is there any http proxy or reverse proxy in your setup?