You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by mi...@agilent.com on 2004/08/17 22:52:02 UTC

Problem with files that have %

I am using subversion at my work to revison manage our ASIC chip 
design directories.  The cadence library structure that stores our 
design repositories uses files that end in % as backup files.  I have 
noticed some odd behavior with theses files.

Specifically, If I try and do any svn commands using the filenames 
that end in % I get an error.

-> svn log 'file:///tmp/foo/blah/foo%'
svn: URL 'file:///tmp/foo/blah/foo%' is not properly URI-encoded

I've tried escaping the % and putting it in quotes without success.  I 
do have a workaround in that I can run any svn command in the working 
directory and have it work properly, but any time I try and use the 
files with a URL scheme it fails.

-Mike

P.S. I am using subversion 1.1.0rc2 on fedora core 2

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Problem with files that have %

Posted by Greg Hudson <gh...@MIT.EDU>.
On Fri, 2004-08-20 at 14:45, C. Michael Pilato wrote:
> Can we go a step beyond that and say that it's safe to translate
> anytime '%' isn't followed by two hex-ish characters [0-9A-Fa-f] ?

Web browsers do not appear to do any translation of % characters.  I
don't think we should either; it's going too far into the realm of
heuristics.



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Problem with files that have %

Posted by Jani Averbach <ja...@jaa.iki.fi>.
On 2004-08-23 22:09+0200, Peter N. Lundblad wrote:
> On Fri, 20 Aug 2004, Jani Averbach wrote:
> 
> > I really don't know, but as a data point with Konqueror (3.2.3) you
> > could use:
...
> > http://www.jaa.iki.fi/~jaa/test/foo%bar
> What does this mean? 

It is a normal '%' escaped hex-value.

> Is %ba the byte with hex value BA or is it the three
> bytes %, b and a? IN the former case, it would be an invalid UTF-8
> sequence. I don't like this at all.

Yeah, I could see why you don't like these. My point was to show what
Konqueror does at the moment.

BR, Jani

-- 
Jani Averbach


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Problem with files that have %

Posted by "Peter N. Lundblad" <pe...@famlundblad.se>.
On Fri, 20 Aug 2004, Jani Averbach wrote:

> On 2004-08-21 01:23+0100, Max Bowsher wrote:
> > It's weird, yes, but good-weird in my opinion.
> >
> I really don't know, but as a data point with Konqueror (3.2.3) you
> could use:
>
> http://www.jaa.iki.fi/~jaa/test/foo%
> http://www.jaa.iki.fi/~jaa/test/foo%n
Above are unambigous.

> http://www.jaa.iki.fi/~jaa/test/foo%bar
What does this mean? Is %ba the byte with hex value BA or is it the three
bytes %, b and a? IN the former case, it would be an invalid UTF-8
sequence. I don't like this at all.

 > http://www.jaa.iki.fi/~jaa/test/foo%25bar
>
A valid URI with a percent sign.

//Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Problem with files that have %

Posted by Jani Averbach <ja...@jaa.iki.fi>.
On 2004-08-21 01:23+0100, Max Bowsher wrote:
> kfogel@collab.net wrote:
> >"C. Michael Pilato" <cm...@collab.net> writes:
> >>Can we go a step beyond that and say that it's safe to translate
> >>anytime '%' isn't followed by two hex-ish characters [0-9A-Fa-f] ?
> >
> >That's a little too weird -- some alphabetic characters cause one
> >behavior, others cause another.
> 
> It's weird, yes, but good-weird in my opinion.
> 
I really don't know, but as a data point with Konqueror (3.2.3) you
could use:

http://www.jaa.iki.fi/~jaa/test/foo%
http://www.jaa.iki.fi/~jaa/test/foo%n
http://www.jaa.iki.fi/~jaa/test/foo%bar
http://www.jaa.iki.fi/~jaa/test/foo%25bar

With Mozilla FireFox (0.9.3) only last two will work.

> It's a useful helper to working with URLs at the command line.
> 

That's true, if you know what you are doing.

BR, Jani

-- 
Jani Averbach

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Problem with files that have %

Posted by "Peter N. Lundblad" <pe...@famlundblad.se>.
On Fri, 20 Aug 2004 kfogel@collab.net wrote:

> "C. Michael Pilato" <cm...@collab.net> writes:
> > Can we go a step beyond that and say that it's safe to translate
> > anytime '%' isn't followed by two hex-ish characters [0-9A-Fa-f] ?
>
> That's a little too weird -- some alphabetic characters cause one
> behavior, others cause another.
>
I don't like it either (and din't implement it for that reason). Also, if
we want to introduce special cases (escaping [ and ] after the host part,
for example (they delimit IPv6 addresses in the host part)), please let's
be careful for 1.1 at least.

Thanks,
//Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Problem with files that have %

Posted by Max Bowsher <ma...@ukf.net>.
kfogel@collab.net wrote:
> "C. Michael Pilato" <cm...@collab.net> writes:
>> Can we go a step beyond that and say that it's safe to translate
>> anytime '%' isn't followed by two hex-ish characters [0-9A-Fa-f] ?
> 
> That's a little too weird -- some alphabetic characters cause one
> behavior, others cause another.

It's weird, yes, but good-weird in my opinion.

It's a useful helper to working with URLs at the command line.

Max.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Problem with files that have %

Posted by kf...@collab.net.
"C. Michael Pilato" <cm...@collab.net> writes:
> Can we go a step beyond that and say that it's safe to translate
> anytime '%' isn't followed by two hex-ish characters [0-9A-Fa-f] ?

That's a little too weird -- some alphabetic characters cause one
behavior, others cause another.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Problem with files that have %

Posted by "C. Michael Pilato" <cm...@collab.net>.
Michael W Thelen <th...@cs.utah.edu> writes:

> Maybe it would be safe to translate % automatically to %25 only if
> it's at the end of the string, as it is in the original poster's
> example?

Can we go a step beyond that and say that it's safe to translate
anytime '%' isn't followed by two hex-ish characters [0-9A-Fa-f] ?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Problem with files that have %

Posted by Michael W Thelen <th...@cs.utah.edu>.
* Greg Hudson <gh...@MIT.EDU> [2004-08-17 23:12]:
> > Hm.  1.1.0-rc2 has 'auto-escaping'.  I wonder why it's not automatically 
> > converting % into %25, the same way it converts space into %20.
> 
> I think '%' is one of those characters which it would be dangerous to
> auto-escape, since it's itself the escape character.  It would be odd
> for 'foo%bar' to work one way but 'foo%25bar' to work a completely
> different way.

Maybe it would be safe to translate % automatically to %25 only if it's at the
end of the string, as it is in the original poster's example?

-- 
Michael W. Thelen
The reverse side also has a reverse side.
                -- Japanese proverb

Re: Problem with files that have %

Posted by Greg Hudson <gh...@MIT.EDU>.
On Tue, 2004-08-17 at 23:05, Ben Collins-Sussman wrote:
> Hm.  1.1.0-rc2 has 'auto-escaping'.  I wonder why it's not automatically 
> converting % into %25, the same way it converts space into %20.

I think '%' is one of those characters which it would be dangerous to
auto-escape, since it's itself the escape character.  It would be odd
for 'foo%bar' to work one way but 'foo%25bar' to work a completely
different way.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Problem with files that have %

Posted by Ben Collins-Sussman <su...@collab.net>.
Bryan Donlan wrote:

> % is used as an escape character in URLs. Try replacing each % with %25.
> 

Hm.  1.1.0-rc2 has 'auto-escaping'.  I wonder why it's not automatically 
converting % into %25, the same way it converts space into %20.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Problem with files that have %

Posted by Bryan Donlan <bd...@gmail.com>.
On Tue, 17 Aug 2004 16:52:02 -0600, michael_rytting@agilent.com
<mi...@agilent.com> wrote:
> I am using subversion at my work to revison manage our ASIC chip
> design directories.  The cadence library structure that stores our
> design repositories uses files that end in % as backup files.  I have
> noticed some odd behavior with theses files.
> 
> Specifically, If I try and do any svn commands using the filenames
> that end in % I get an error.
> 
> -> svn log 'file:///tmp/foo/blah/foo%'
> svn: URL 'file:///tmp/foo/blah/foo%' is not properly URI-encoded
> 
> I've tried escaping the % and putting it in quotes without success.  I
> do have a workaround in that I can run any svn command in the working
> directory and have it work properly, but any time I try and use the
> files with a URL scheme it fails.
> 
> -Mike
> 
> P.S. I am using subversion 1.1.0rc2 on fedora core 2

% is used as an escape character in URLs. Try replacing each % with %25.

-- 
bd

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org