You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Kamesh Jayachandran <ka...@collab.net> on 2006/02/07 13:52:20 UTC

[PATCH] Fix for failing switch_tests.py:relocate_beyond_repos_root for svn+ssh urls

Hi All,
Find the attached patch.

With regards
Kamesh Jayachandran

[[[
Fix for failing switch_tests.py:relocate_beyond_repos_root for svn+ssh urls

Patch by: Kamesh Jayachandran <ka...@collab.net>

* subversion/tests/cmdline/switch_tests.py
  (relocate_beyond_repos_root):
  The '+' character in svn+ssh url causes the regex to fail so escaping it.
]]]


Re: [PATCH] Fix for failing switch_tests.py:relocate_beyond_repos_root for svn+ssh urls

Posted by Daniel Rall <dl...@collab.net>.
Looks good, Kamesh.  I've committed your patch in r18382.

- Dan

On Tue, 07 Feb 2006, Kamesh Jayachandran wrote:

> Hi Peter,
> 
> Yes you are correct, escaping the '^' and '$' was the problem.
> 
> The attached patch incorporates it.
> 
> Thanks.
> With regards
> Kamesh Jayachandran
> 
> [[[
> Fix for failing switch_tests.py:relocate_beyond_repos_root for svn+ssh urls
> 
> Patch by: Kamesh Jayachandran <ka...@collab.net>
> 
> * subversion/tests/cmdline/switch_tests.py
> (relocate_beyond_repos_root):
> The '+' character in svn+ssh url causes the regex to fail so escaping
> the full url with re.escape()
> ]]]
> 
> Peter N. Lundblad wrote:
> >On Tue, 7 Feb 2006, Kamesh Jayachandran wrote:
> >
> >  
> >>Hi All,
> >>Find the attached patch.
> >>
> >>With regards
> >>Kamesh Jayachandran
> >>
> >>[[[
> >>Fix for failing switch_tests.py:relocate_beyond_repos_root for svn+ssh 
> >>urls
> >>
> >>Patch by: Kamesh Jayachandran <ka...@collab.net>
> >>
> >>* subversion/tests/cmdline/switch_tests.py
> >>  (relocate_beyond_repos_root):
> >>  The '+' character in svn+ssh url causes the regex to fail so escaping 
> >>  it.
> >>]]]
> >>
> >>
> >>    
> >OK, seems like you're escaping the whole string, not just the URLs. The
> >problem is that the ^ operator would get escaped by re.escape.
> >
> >Please try re.escape on the individual URLs.  I like that better because
> >it can be used in other places as well.
> >
> >Thanks,
> >//Peter
> >
> >  
> 

> Index: subversion/tests/cmdline/switch_tests.py
> ===================================================================
> --- subversion/tests/cmdline/switch_tests.py	(revision 18313)
> +++ subversion/tests/cmdline/switch_tests.py	(working copy)
> @@ -974,7 +974,9 @@
>  
>    # Check that we can contact the repository, meaning that the relocate
>    # actually changed the URL.
> -  svntest.actions.run_and_verify_svn(None, '^URL: ' + other_A_url + '$', [],
> +  #to address svn+ssh urls where '+' seems to be mistaken by the re.match
> +  escaped_exp = '^' + re.escape('URL: ' + other_A_url) + '$'
> +  svntest.actions.run_and_verify_svn(None, escaped_exp, [],
>                                       'info', '-rHEAD', A_wc_dir)
>  
>  #----------------------------------------------------------------------
> 

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

-- 

Daniel Rall

Re: [PATCH] Fix for failing switch_tests.py:relocate_beyond_repos_root for svn+ssh urls

Posted by Kamesh Jayachandran <ka...@collab.net>.
Hi Peter,

Yes you are correct, escaping the '^' and '$' was the problem.

The attached patch incorporates it.

Thanks.
With regards
Kamesh Jayachandran

[[[
Fix for failing switch_tests.py:relocate_beyond_repos_root for svn+ssh urls

Patch by: Kamesh Jayachandran <ka...@collab.net>

* subversion/tests/cmdline/switch_tests.py
(relocate_beyond_repos_root):
The '+' character in svn+ssh url causes the regex to fail so escaping
the full url with re.escape()
]]]

Peter N. Lundblad wrote:
> On Tue, 7 Feb 2006, Kamesh Jayachandran wrote:
>
>   
>> Hi All,
>> Find the attached patch.
>>
>> With regards
>> Kamesh Jayachandran
>>
>> [[[
>> Fix for failing switch_tests.py:relocate_beyond_repos_root for svn+ssh urls
>>
>> Patch by: Kamesh Jayachandran <ka...@collab.net>
>>
>> * subversion/tests/cmdline/switch_tests.py
>>   (relocate_beyond_repos_root):
>>   The '+' character in svn+ssh url causes the regex to fail so escaping it.
>> ]]]
>>
>>
>>     
> OK, seems like you're escaping the whole string, not just the URLs. The
> problem is that the ^ operator would get escaped by re.escape.
>
> Please try re.escape on the individual URLs.  I like that better because
> it can be used in other places as well.
>
> Thanks,
> //Peter
>
>   


Re: [PATCH] Fix for failing switch_tests.py:relocate_beyond_repos_root for svn+ssh urls

Posted by "Peter N. Lundblad" <pe...@famlundblad.se>.
On Tue, 7 Feb 2006, Kamesh Jayachandran wrote:

> Hi All,
> Find the attached patch.
>
> With regards
> Kamesh Jayachandran
>
> [[[
> Fix for failing switch_tests.py:relocate_beyond_repos_root for svn+ssh urls
>
> Patch by: Kamesh Jayachandran <ka...@collab.net>
>
> * subversion/tests/cmdline/switch_tests.py
>   (relocate_beyond_repos_root):
>   The '+' character in svn+ssh url causes the regex to fail so escaping it.
> ]]]
>
>
OK, seems like you're escaping the whole string, not just the URLs. The
problem is that the ^ operator would get escaped by re.escape.

Please try re.escape on the individual URLs.  I like that better because
it can be used in other places as well.

Thanks,
//Peter

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