[MERGE] Improve error handling in msgeditor._run_editor.

Andrew Bennetts andrew.bennetts at canonical.com
Thu Dec 18 02:51:33 GMT 2008


Matthew D. Fuller wrote:
> On Thu, Dec 18, 2008 at 10:53:14AM +1100 I heard the voice of
> Andrew Bennetts, and lo! it spake thus:
> >
> >      for varname in 'VISUAL', 'EDITOR':
> >          if varname in os.environ:
> > -            yield os.environ[varname]
> > +            yield os.environ[varname], '$VISUAL'
>                                           ^^^^^^^^^
> 
> That can't be right...
> 
> (well, OK, it can.  But it can also be wrong :)

Boy do I suck!  Fixed :)

=== modified file 'bzrlib/msgeditor.py'
--- bzrlib/msgeditor.py	2008-12-17 23:43:06 +0000
+++ bzrlib/msgeditor.py	2008-12-18 02:50:23 +0000
@@ -45,7 +45,7 @@
         
     for varname in 'VISUAL', 'EDITOR':
         if varname in os.environ:
-            yield os.environ[varname], '$VISUAL'
+            yield os.environ[varname], '$' + varname
 
     if sys.platform == 'win32':
         for editor in 'wordpad.exe', 'notepad.exe':


-Andrew.




More information about the bazaar mailing list