You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Bartosz Pierzchlewicz <Ba...@komputronik.pl> on 2017/10/05 12:38:16 UTC

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

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

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

Posted by Bert Huijben <be...@qqmail.nl>.

> -----Original Message-----
> From: Daniel Shahaf [mailto:d.s@daniel.shahaf.name]
> Sent: vrijdag 6 oktober 2017 16:24
> To: Bartosz Pierzchlewicz <Ba...@komputronik.pl>;
> users@subversion.apache.org
> 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


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

Posted by Bartosz Pierzchlewicz <Ba...@komputronik.pl>.
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:d.s@daniel.shahaf.name] 
Sent: Friday, October 6, 2017 4:24 PM
To: Bartosz Pierzchlewicz; users@subversion.apache.org
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?

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

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
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?

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

Posted by Bartosz Pierzchlewicz <Ba...@komputronik.pl>.
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:jcorvel@gmail.com] 
Sent: Friday, October 6, 2017 1:30 PM
To: Bartosz Pierzchlewicz
Cc: users@subversion.apache.org
Subject: Re: Problem with file name encoding during merge - URL Encoding (Percent Encoding)

On Fri, Oct 6, 2017 at 8:45 AM, Bartosz Pierzchlewicz <Ba...@komputronik.pl> 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

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

Posted by Johan Corveleyn <jc...@gmail.com>.
On Fri, Oct 6, 2017 at 8:45 AM, Bartosz Pierzchlewicz
<Ba...@komputronik.pl> 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

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

Posted by Bartosz Pierzchlewicz <Ba...@komputronik.pl>.
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


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

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
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