messy error if BZR_HOME does not exist

Bug #137407 reported by Martin Pool on 2007-09-05
4
Affects Status Importance Assigned to Milestone
Bazaar
Low
Unassigned
Breezy
Medium
Martin Packman

Bug Description

Alexander reports:

BTW, I found another bug related to BZR_HOME and config_dir.
If BZR_HOME contains path to non-existing directory bzr
generate not very clear error message:

E:\Bazaar\mydev\show-version>set BZR_HOME=non-existing

E:\Bazaar\mydev\show-version>python bzr st
bzr: ERROR: [Errno 2] No such file or directory: 'non-existing/bazaar'

E:\Bazaar\mydev\show-version>python bzr -Derror st
bzr: ERROR: exceptions.OSError: [Errno 2] No such file or directory: 'non-existing/bazaar'

Traceback (most recent call last):
 File "E:\Bazaar\mydev\show-version\bzrlib\commands.py", line 798, in run_bzr_catch_errors
   return run_bzr(argv)
 File "E:\Bazaar\mydev\show-version\bzrlib\commands.py", line 756, in run_bzr
   ret = run(*run_argv)
 File "E:\Bazaar\mydev\show-version\bzrlib\commands.py", line 490, in run_argv_aliases
   return self.run(**all_cmd_args)
 File "E:\Bazaar\mydev\show-version\bzrlib\commands.py", line 766, in ignore_pipe
   result = func(*args, **kwargs)
 File "E:\Bazaar\mydev\show-version\bzrlib\builtins.py", line 191, in run
   to_file=self.outf, short=short, versioned=versioned)
 File "E:\Bazaar\mydev\show-version\bzrlib\status.py", line 117, in show_tree_status
   delta.unversioned = [unversioned for unversioned in
 File "E:\Bazaar\mydev\show-version\bzrlib\workingtree.py", line 1603, in is_ignored
   self._ignoreglobster = globbing.Globster(self.get_ignore_list())
 File "E:\Bazaar\mydev\show-version\bzrlib\workingtree.py", line 1578, in get_ignore_list
   ignore_globs.update(ignores.get_user_ignores())
 File "E:\Bazaar\mydev\show-version\bzrlib\ignores.py", line 127, in get_user_ignores
   _set_user_ignores(USER_DEFAULTS)
 File "E:\Bazaar\mydev\show-version\bzrlib\ignores.py", line 149, in _set_user_ignores
   config.ensure_config_dir_exists()
 File "E:\Bazaar\mydev\show-version\bzrlib\config.py", line 735, in ensure_config_dir_exists
   os.mkdir(parent_dir)
OSError: [Errno 2] No such file or directory: 'non-existing/bazaar'

bzr 0.91.0dev0 on python 2.4.4.final.0 (win32)
arguments: ['bzr', '-Derror', 'st']

Martin Pool (mbp) on 2007-09-05
Changed in bzr:
importance: Undecided → Low
status: New → Triaged
Martin Pool (mbp) on 2010-03-19
Changed in bzr:
status: Triaged → Confirmed
Jelmer Vernooij (jelmer) on 2017-11-09
tags: added: check-for-breezy
Jelmer Vernooij (jelmer) on 2019-06-25
tags: removed: check-for-breezy
Changed in brz:
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Martin Packman (gz)
milestone: none → 3.1.0
Jelmer Vernooij (jelmer) on 2019-11-20
Changed in brz:
status: Triaged → Fix Committed
Jelmer Vernooij (jelmer) on 2020-07-21
Changed in brz:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers