Bazaar Explorer won't open after getting error while editing editors.conf

Bug #953293 reported by Brian Cox

This bug report was converted into a question: question #190751: Bazaar Explorer won't open after getting error while editing editors.conf.

6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar Explorer
Invalid
Undecided
Unassigned

Bug Description

Hello,

One of our Bazaar users ran into an issue this morning that I hope someone can help with.

There is one particular file type that we have had a little trouble with when trying to open the file from the modified/added/etc list in the main pane of Bazaar Explorer. In trying to resolve this he made a change, got an error and Bazaar Explorer gave an error with the option to ignore/close. He closed and now Bazaar explorer wouldn't open again. Some details from the user:

------------------------------------
I was editing editors.conf. I added the following line to it:

uxf = "C:\Users\Ray.Hendrey\bin\test_cmd_parms.bat %(root)s %branch_root"

The test_cmd_parms.bat is just a batch file that echoes the command line parameters to a text file, along with the environmental variables that are set. I am trying to get it to open the UXF files when I click on one in the status report. I have determined that the file name supplied to the command begins with docs/, so it is relative to the beginning of the current working tree. I was trying to find out if there is a variable that will allow me to specify that. I was using http://doc.bazaar.canonical.com/explorer/en/tutorials/customization.html as guidance. It contains the line " Placeholders are included using the format %(name)s. To include a real % in an action, use %%", and I was trying through experimentation, to find out what %(names)s means. Anyways, here is the error message.
----------------------------------

 I have attached the screenshot with the error.

He tried a couple of other things to try to get it to open again:

----------------------------------
I removed the s, so the line now reads: uxf = "C:\Users\Ray.Hendrey\bin\test_cmd_parms.bat %(root) %branch_root"
and it starts, but it takes 20 seconds or so for the GUI to show up. It may still be logging errors.... removing the "%(root) %branch_root" part does not seem to speed it up any.
----------------------------------

Here is the system.log information since his last "clean" startup:

Mon 2012-03-12 09:12:41 -0700
0.047 bazaar version: 2.3.1
0.047 bzr arguments: [u'explorer']
0.062 looking for plugins in C:/Users/ray.hendrey/AppData/Roaming/bazaar/2.0/plugins
0.062 looking for plugins in C:/Program Files (x86)/Bazaar/plugins
0.125 encoding stdout as osutils.get_user_encoding() 'cp1252'
0.234 loading explorer extensions for clothes [u'Bazaar support', u'Register on Launchpad']
0.234 explorer extensions provided by the colo plugin in C:/Program Files (x86)/Bazaar/plugins/colo/explorer
0.265 Traceback (most recent call last):
File "bzrlib\commands.pyo", line 926, in exception_to_return_code
File "bzrlib\commands.pyo", line 1126, in run_bzr
File "bzrlib\commands.pyo", line 691, in run_argv_aliases
File "bzrlib\commands.pyo", line 713, in run
File "bzrlib\cleanup.pyo", line 135, in run_simple
File "bzrlib\cleanup.pyo", line 165, in _do_with_cleanups
File "C:/Program Files (x86)/Bazaar/plugins\explorer\lib\commands.py", line 162, in run
File "C:/Program Files (x86)/Bazaar/plugins\explorer\lib\explorer.py", line 204, in __init__
File "C:/Program Files (x86)/Bazaar/plugins\explorer\lib\explorer.py", line 818, in init_hats
File "C:/Program Files (x86)/Bazaar/plugins\explorer\lib\explorer.py", line 823, in refresh_menus
File "C:/Program Files (x86)/Bazaar/plugins\explorer\lib\explorer.py", line 834, in _refresh_custom_editors
File "C:/Program Files (x86)/Bazaar/plugins\explorer\lib\extensions\accessories.py", line 396, in custom_editors
File "bzrlib\util\configobj\configobj.pyo", line 736, in items
File "bzrlib\util\configobj\configobj.pyo", line 746, in values
File "bzrlib\util\configobj\configobj.pyo", line 589, in __getitem__
File "bzrlib\util\configobj\configobj.pyo", line 582, in _interpolate
File "bzrlib\util\configobj\configobj.pyo", line 389, in interpolate
File "bzrlib\util\configobj\configobj.pyo", line 367, in recursive_interpolate
File "bzrlib\util\configobj\configobj.pyo", line 453, in _parse_match
File "bzrlib\util\configobj\configobj.pyo", line 423, in _fetch
MissingInterpolationOption: missing option "root" in interpolation.

Any help you can offer would be much appreciated!

Thanks,
Brian

Revision history for this message
Brian Cox (brian-cox) wrote :
Revision history for this message
Alexander Belchenko (bialix) wrote :

That long description would be better have in questions section. Anyway.

Revision history for this message
Alexander Belchenko (bialix) wrote :

According to comments in original editors.conf you should list file extensions and according to the instructions in http://doc.bazaar.canonical.com/explorer/en/tutorials/customization.html you mustn't use any placeholders in the editors.conf, only filename/path of the editor

# Editor applications for various file extensions on various desktops.
# A DEFAULT section can be given providing cross-platform defaults.
# The recognised desktop names are gnome, kde, windows and osx.
# Within each section, the key is a comma separated list of file
# extensions and the value is the name of the application to edit
# the file with. For example:
#
# [DEFAULT]
# doc, xls, ppt = ooffice
#
# [windows]
# vsd, vss, vst, vdx, vsx, vtx = visio

So, in your case the settings should be

uxf = "C:\Users\Ray.Hendrey\bin\test_cmd_parms.bat"

And Explorer will run "editor" for "uxf" as

"C:\Users\Ray.Hendrey\bin\test_cmd_parms.bat" /path/to/selected/file

Changed in bzr-explorer:
status: New → Incomplete
description: updated
Revision history for this message
Alexander Belchenko (bialix) wrote :

Brian, this is really should be a question. You can ask questions in QBzr mailing list: http://groups.google.com/group/qbzr?pli=1
or using Answers section on Launchpad: https://answers.launchpad.net/bzr-explorer

Changed in bzr-explorer:
status: Incomplete → Invalid
status: Invalid → New
status: New → Invalid
Revision history for this message
Brian Cox (brian-cox) wrote :

I agree we were using it in an unintended way. But...

Since this causes Bazaar Explorer to crash and not be able to be reopened until the editors.conf file has been changed back, this should still be considered a bug. Some type of error message about why Bazaar Explorer isn't opening would be nice, at a minimum.

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.