EDITOR environmental variable cannot be path surrounded by quotes. Bad error message.

Bug #367629 reported by amicitas
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Low
Unassigned

Bug Description

This has only been tested on windows.
bazaar v1.13

If the value of the EDITOR environmental variable is a path surrounded by quotes, commit will fail.
The error message given is not useful.

At the very least a error should be given stating the value of EDITOR is not valid.

Here is the terminal output.
Here three attempts are tried:
  1. EDITOR set to valid path, but with quotes.
  2. EDITOR set in invalid path, no quotes.
  3. EDITOR set to valid path, no quotes.
=====================

>
>
>set EDITOR="C:\Programs\text\emacs-22.3\bin\emacs.exe"
>echo %EDITOR%
"C:\Programs\text\emacs-22.3\bin\emacs.exe"

>bzr commit
Committing to: C:/library/code/python/annotatex/releases/test/
modified README
aborting commit write group: WindowsError(123, 'The filename, directory name, or volume label syntax is incorrect')
bzr: ERROR: [Error 123] The filename, directory name, or volume label syntax is incorrect

>
>
>set EDITOR="C:\Programs\text\emacs-22.3\bin\emacs.exe"
>echo %EDITOR%
C:\Programs\text\emacs-22.3\bin\emacs_wrong.exe

>bzr commit
Committing to: C:/library/code/python/annotatex/releases/test/
modified README
Could not start editor "C:\Programs\text\emacs-22.3\bin\emacs_wrong.exe" (specified by $EDITOR): [Error 2] The system ca
nnot find the file specified

aborting commit write group: BzrCommandError(empty commit message specified)
bzr: ERROR: empty commit message specified

>
>
>set EDITOR=C:\Programs\text\emacs-22.3\bin\emacs.exe
>echo %EDITOR%
C:\Programs\text\emacs-22.3\bin\emacs.exe

>bzr commit
Committing to: C:/library/code/python/annotatex/releases/test/
modified README
aborting commit write group: BzrCommandError(empty commit message specified)
bzr: ERROR: empty commit message specified

>

Entry in .bzr.log:
============
Sun 2009-04-26 15:30:59 -0700
0.203 bzr arguments: [u'commit']
0.234 looking for plugins in C:/home/amicitas/.bazaar/bazaar/2.0/plugins
0.234 looking for plugins in C:/Programs/programming/Bazaar/plugins
0.531 encoding stdout as sys.stdout encoding 'cp437'
0.625 opening working tree 'C:/library/code/python/annotatex/releases/test'
0.656 preparing to commit
[13436] 2009-04-26 15:30:59.703 INFO: Committing to: C:/library/code/python/annotatex/releases/test/
0.703 Selecting files for commit with filter []
[13436] 2009-04-26 15:30:59.733 INFO: modified README
0.875 check paths: None
0.906 aborting commit write group because of exception:
0.906 Traceback (most recent call last):
  File "bzrlib\commit.pyo", line 379, in commit
  File "bzrlib\builtins.pyo", line 2769, in get_message
  File "bzrlib\msgeditor.pyo", line 145, in edit_commit_message_encoded
  File "bzrlib\msgeditor.pyo", line 64, in _run_editor
  File "subprocess.pyo", line 444, in call
  File "subprocess.pyo", line 594, in __init__
  File "subprocess.pyo", line 816, in _execute_child
WindowsError: [Error 123] The filename, directory name, or volume label syntax is incorrect

[13436] 2009-04-26 15:30:59.905 INFO: aborting commit write group: WindowsError(123, 'The filename, directory name, or v
olume label syntax is incorrect')
1.078 Traceback (most recent call last):
  File "bzrlib\commands.pyo", line 716, in exception_to_return_code
  File "bzrlib\commands.pyo", line 911, in run_bzr
  File "bzrlib\commands.pyo", line 547, in run_argv_aliases
  File "bzrlib\builtins.pyo", line 2789, in run
  File "bzrlib\decorators.pyo", line 192, in write_locked
  File "bzrlib\workingtree_4.pyo", line 226, in commit
  File "bzrlib\decorators.pyo", line 192, in write_locked
  File "bzrlib\mutabletree.pyo", line 228, in commit
  File "bzrlib\commit.pyo", line 379, in commit
  File "bzrlib\builtins.pyo", line 2769, in get_message
  File "bzrlib\msgeditor.pyo", line 145, in edit_commit_message_encoded
  File "bzrlib\msgeditor.pyo", line 64, in _run_editor
  File "subprocess.pyo", line 444, in call
  File "subprocess.pyo", line 594, in __init__
  File "subprocess.pyo", line 816, in _execute_child
WindowsError: [Error 123] The filename, directory name, or volume label syntax is incorrect

1.078 return code 3

Jelmer Vernooij (jelmer)
Changed in bzr:
importance: Undecided → Low
status: New → Triaged
tags: added: win32
Martin Pool (mbp)
Changed in bzr:
status: Triaged → Confirmed
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.