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

Re: Bug: IP address bogusly interpreted as peg revision

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Sat, 24 May 2008 11:04:41 +0100

(Troy - CC'ing you.)

Jens Seidel wrote:
> On Fri, May 23, 2008 at 09:17:50PM +0100, Julian Foad wrote:
>
>>Jens Seidel wrote:
>>
>>>I noticed the following bug in the 1.5 branch:
>>>A IP address may bogusly interpreted as peg revision as demonstrated by
>>>
>>>$ svn log svn+ssh://svn@10.0.1.1
>>
>>[...]
>>
>>>svn: Syntax error parsing revision '10.0.1.1'
>>
>>That's unfortunate, but not a bug. It's a natural consequence of defining
>
> Not a bug? OK, I trust you. But a workaround should not be difficult.

I'm not sure we mean the same thing by "workaround"!

>>the command-line syntax as
>>
>> PATH-OR-URL[@PEG]
>
> Never considered this as strong syntax definition.

Well, that's just how it is at the moment, as far as I know, not necessarily a
strong decision. We might be able to define it some other way, maybe something
like:

   PATH[@PEG] | SCHEME://HOST[/[URLPATH][@PEG]]

such that your usage would do what you want. That might be a good idea. I don't
know.

>>There are various work-arounds: the canonical way to "escape" an argument
>>with no peg revision is to add an "@":
>>
>> $ svn log svn+ssh://svn@10.0.1.1@
>>
>>but in this particular example you might prefer to end the URL with "/":
>>
>> $ svn log svn+ssh://svn@10.0.1.1/
>
>
> No, this leads to the same error.

Oh, so it does! That's a bug: we're not supposed to be looking for a peg after
the last "/". I suspect what is happening is the path is being "canonicalised"
first, which whould strip off the final "/", but that's wrong and Troy Curtis
is already working on a patch to fix the parsing of peg-revs with
repository-relative URLs, and hopefully that will fix this too.

> I just asked to get the permission to file a bug. I didn't assumed the
> behaviour could be accepted but it is indeed not a big deal so it is OK
> for me.

Thanks. If you'd like to help see if Troy's patch fixes the above usage, that
would be great. (No worries if not.) His last revision of the patch is at
<http://svn.haxx.se/dev/archive-2008-05/0477.shtml> and he hopes to send a
revised version soon.

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-05-24 12:05:02 CEST

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

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