`bzr co .` in branch with WT gives error FileExists

Bug #139824 reported by Alexander Belchenko
2
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Low
Unassigned

Bug Description

I run `bzr co .` in branch with WT instead of `bzr up` and got ugly error:

C:\work\Bazaar\mydev\test>py24 bzr co .
bzr: ERROR: File exists: u'C:/work/Bazaar/mydev/test/.bzr': [Errno 17] File exists

C:\work\Bazaar\mydev\test>py24 bzr -Derror co .
bzr: ERROR: bzrlib.errors.FileExists: File exists: u'C:/work/Bazaar/mydev/test/.bzr': [Errno 17] File exists

Traceback (most recent call last):
  File "C:\work\Bazaar\mydev\test\bzrlib\commands.py", line 802, in run_bzr_catch_errors
    return run_bzr(argv)
  File "C:\work\Bazaar\mydev\test\bzrlib\commands.py", line 758, in run_bzr
    ret = run(*run_argv)
  File "C:\work\Bazaar\mydev\test\bzrlib\commands.py", line 492, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "C:\work\Bazaar\mydev\test\bzrlib\builtins.py", line 970, in run
    source.create_checkout(to_location, revision_id, lightweight)
  File "C:\work\Bazaar\mydev\test\bzrlib\branch.py", line 771, in create_checkout
    checkout = format.initialize_on_transport(t)
  File "C:\work\Bazaar\mydev\test\bzrlib\bzrdir.py", line 1324, in initialize_on_transport
    mode=temp_control._dir_mode)
  File "C:\work\Bazaar\mydev\test\bzrlib\transport\local.py", line 303, in mkdir
    self._mkdir(self._abspath(relpath), mode=mode)
  File "C:\work\Bazaar\mydev\test\bzrlib\transport\local.py", line 299, in _mkdir
    self._translate_error(e, abspath)
  File "C:\work\Bazaar\mydev\test\bzrlib\transport\__init__.py", line 347, in _translate_error
    raise errors.FileExists(path, extra=e)
FileExists: File exists: u'C:/work/Bazaar/mydev/test/.bzr': [Errno 17] File exists

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

I think error should say "There is already exists checkout/working tree", but not talk about .bzr directory.

Revision history for this message
Tim Hatch (timhatch) wrote :

I ran into this today as well, though the default error is now even more verbose with bzr 1.2.0 on FreeBSD (python 2.5):

[tim@dalek ~/tmp/demo]$ bzr checkout
[tim@dalek ~/tmp/demo]$ bzr checkout
bzr: ERROR: File exists: u'/usr/home/tim/tmp/demo/.bzr': [Errno 17] File exists: '/usr/home/tim/tmp/demo/.bzr'

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

I think bzr should say in this case something like: "Working tree already exists", similar to error when you try to run bzr init on already initialized branch root.

Changed in bzr:
importance: Undecided → Low
status: New → 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.