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

Re: 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 15:52:06 CEST

Michael Wood <mwood@its.uct.ac.za> writes:

>> + # Unset these so that the user's environment doesn't affect the tests
>> + os.environ['SVN_EDITOR'] = ''
>> + os.environ['VISUAL'] = ''
>> + os.environ['EDITOR'] = ''
>
> I think you're looking for:
>
> del os.environ['blah']

Ah, so that's how one does it, thanks! It turns out that my comment
was inaccurate and unsetting the variables is not what I want.
Instead, what I want to do is set SVN_EDITOR to something that will
prevent an external editor being started, as that will override both
.subversion/config and my environment.

Any objections to this

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,10 @@
   global cleanup_mode
   testnum = None
 
+ # Explicitly set this so that no editor will be invoked irrespective
+ # of the user's environment or config settings.
+ os.environ['SVN_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 15:53:12 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.