[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[TSVN] Re: Bug report: "relocate" does not work in some cases

From: Duncan Booth <duncan.booth_at_suttoncourtenay.org.uk>
Date: 2005-08-05 15:25:46 CEST

Simon Large wrote:

>> I think the problem is to know wether somebody entered an escaped or
>> an unescaped URL. If you escape an escaped URL again it will break.
>
> Two alternatives:
>
> 1. Escape the URL *unless* it already contains '%'.
> 2. Escape the URL if it contains an illegal char *except* '%'.
>
> Both suffer the same problem that if a folder name really does contain
> a '%' char then it may appear as an already-escaped URL. The second
> option is more likely to catch this if there is any other illegal
> char, like space.

I think you have to decide up front whether the user should enter an
escaped or unescaped URL.

If you decide to accept only unescaped URLs (which I think is friendlier
for the user), then you simply have to escape it. If you decide to accept
only escaped URLs then you can check for any character which requires
escaping, or any invalid escape sequence, and display a suitable error
message.

What you should not attempt to do is to try to guess what the user meant
and apply the command with a 'fixed' URL.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Fri Aug 5 15:32:04 2005

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.