You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Branko Čibej <br...@xbc.nu> on 2003/03/29 01:58:05 UTC

Re: svn commit: rev 5488 - trunk/subversion/tests/clients/cmdline

philip@tigris.org wrote:

>Author: philip
>Date: Fri Mar 28 12:00:02 2003
>New Revision: 5488
>
>Modified:
>   trunk/subversion/tests/clients/cmdline/update_tests.py
>Log:
>While 'svn mkdir URL' can't create a versioned directory called .svn,
>there are more devious ways to do it.
>
>* subversion/tests/clients/cmdline/update_tests.py
>  (update_receive_illegal_name): Don't skip.  Use mkdir then mv to
>  create a versioned .svn directory.
>
>
>Modified: trunk/subversion/tests/clients/cmdline/update_tests.py
>==============================================================================
>--- trunk/subversion/tests/clients/cmdline/update_tests.py	(original)
>+++ trunk/subversion/tests/clients/cmdline/update_tests.py	Fri Mar 28 12:00:02 2003
>@@ -1002,16 +1002,21 @@
> 
>   # This tests the revision 4334 fix for issue #1068.
>   wc_dir = sbox.wc_dir
>+  legal_url = svntest.main.current_repo_url + '/A/D/G/svn'
>   illegal_url = svntest.main.current_repo_url + '/A/D/G/.svn'
>-  outlines, errlines = svntest.main.run_svn(None, 'mkdir', '-m', 'log msg',
>-                                            illegal_url)
>+  # Ha!  The client doesn't allow us to mkdir a '.svn' but it does
>+  # allow us to copy to a '.svn' so ...
>
So, this'll work until we teach "svn mv" to not allow that. Oh, well...

>+  svntest.actions.run_and_verify_svn(None, None, [],
>+                                     'mkdir', '-m', 'log msg',
>+                                     legal_url)
>+  svntest.actions.run_and_verify_svn(None, None, [],
>+                                     'mv', '-m', 'log msg',
>+                                     legal_url, illegal_url)
>   out, err = svntest.main.run_svn(1, 'up', wc_dir)
>-
>-  if err:
>-    return 0
>-  else:
>-    return 1
>-
>+  for line in err:
>+    if re.search("Obstructed update", line):
>+      return 0
>+  raise svntest.Failure
>
Master Ling, he say: "You no return zero from tests! Return ugly. Now I
teach Python-Fu!"

for line in err:
  if re.search("Obstructed update", line):
    break
else:
  raise svntest.Failure


In the words of Swami Krishnamurthi, "Pay attention to indentation.
Wrong indentation will destroy your harmony and add another 1000
rebirths on your path to Nirvana."


-- 
Brane Čibej   <br...@xbc.nu>   http://www.xbc.nu/brane/


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

Re: svn commit: rev 5488 - trunk/subversion/tests/clients/cmdline

Posted by Philip Martin <ph...@codematters.co.uk>.
Branko Čibej <br...@xbc.nu> writes:

> >+  # Ha!  The client doesn't allow us to mkdir a '.svn' but it does
> >+  # allow us to copy to a '.svn' so ...
> >
> So, this'll work until we teach "svn mv" to not allow that. Oh, well...

If that happens then this test can mutate into a regression test for
the new mv behaviour ;-)

-- 
Philip Martin

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

Re: I'm in regex hell

Posted by Greg Stein <gs...@lyra.org>.
On Sat, Mar 29, 2003 at 04:04:27AM +0100, Branko ??ibej wrote:
> Greg Stein wrote:
>...
> >Dang? What is it with people using regexes to solve all their problems? Is
> >everyone still carrying around that darned Perl legacy? bleh..

(insert missing smiley)

> >  if line.find("Obstructed update") != -1:
> >    break
> 
> Ah, yes. Master Ling, he has only black belt with purple spots; Master
> Stein, he has octarine belt with ultraviolent stripes.

*giggle*

um. "ultraviolent" ... freudian slip? :-)

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

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

Re: I'm in regex hell

Posted by Branko Čibej <br...@xbc.nu>.
Greg Stein wrote:

>On Sat, Mar 29, 2003 at 02:58:05AM +0100, Branko ??ibej wrote:
>  
>
>>...
>>    
>>
>>>+  for line in err:
>>>+    if re.search("Obstructed update", line):
>>>+      return 0
>>>+  raise svntest.Failure
>>>      
>>>
>>Master Ling, he say: "You no return zero from tests! Return ugly. Now I
>>teach Python-Fu!"
>>
>>for line in err:
>>  if re.search("Obstructed update", line):
>>    break
>>else:
>>  raise svntest.Failure
>>    
>>
>
>Dang? What is it with people using regexes to solve all their problems? Is
>everyone still carrying around that darned Perl legacy? bleh..
>
>  if line.find("Obstructed update") != -1:
>    break
>  
>

Ah, yes. Master Ling, he has only black belt with purple spots; Master
Stein, he has octarine belt with ultraviolent stripes.

-- 
Brane Čibej   <br...@xbc.nu>   http://www.xbc.nu/brane/


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

I'm in regex hell (was: svn commit: rev 5488 - trunk/subversion/tests/clients/cmdline)

Posted by Greg Stein <gs...@kurgan.lyra.org>.
On Sat, Mar 29, 2003 at 02:58:05AM +0100, Branko ??ibej wrote:
>...
> >+  for line in err:
> >+    if re.search("Obstructed update", line):
> >+      return 0
> >+  raise svntest.Failure
>
> Master Ling, he say: "You no return zero from tests! Return ugly. Now I
> teach Python-Fu!"
> 
> for line in err:
>   if re.search("Obstructed update", line):
>     break
> else:
>   raise svntest.Failure

Dang? What is it with people using regexes to solve all their problems? Is
everyone still carrying around that darned Perl legacy? bleh..

  if line.find("Obstructed update") != -1:
    break


Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

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