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

Python question [was: Re: svn commit: rev 6338 - in trunk/subversion: libsvn_client tests/clients/cmdline]

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2003-06-25 13:53:37 CEST

cmpilato@tigris.org writes:

> * subversion/tests/clients/cmdline/basic_tests.py
> (basic_mkdir_url): Add -m to the mkdir command so editors don't pop
> up in people's faces when they run the test. :-)

I've done this a couple of times now :( To prevent it happening again
I want the test suite to override my SVN_EDITOR environment variable.
What's the best way to do this? How about the following

Index: subversion/tests/clients/cmdline/svntest/main.py
===================================================================
--- subversion/tests/clients/cmdline/svntest/main.py (revision 6342)
+++ subversion/tests/clients/cmdline/svntest/main.py (working copy)
@@ -494,6 +494,11 @@
   global cleanup_mode
   testnum = None
 
+ # Unset these so that the user's environment doesn't affect the tests
+ os.environ['SVN_EDITOR'] = ''
+ os.environ['VISUAL'] = ''
+ os.environ['EDITOR'] = ''
+
   url_re = re.compile('^(?:--url|BASE_URL)=(.+)')
 
   for arg in sys.argv:

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jun 25 13:54:34 2003

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.