colo-mv prints error message at the end

Bug #776339 reported by Alexander Belchenko
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
bzr-colo
Confirmed
Medium
Unassigned

Bug Description

with bzr.exe 2.4b1 and latest colo from trunk + my patch to support hidden names in subdirs I got this:

C:\Temp>bzr colo-init 1

C:\Temp\1>bzr clist
* trunk

C:\Temp\1>bzr colo-branch --no-switch foo
Branched 0 revision(s).

C:\Temp\1>bzr clist
  foo
* trunk

C:\Temp\1>bzr colo-mv foo .hidden/foo
bzr: ERROR: No such file: u'C:/Temp/1/.bzr/branches/foo': [Error 2] The system cannot find the file specified: u'C:/Temp/1/.bzr/
branches/foo'

.bzr.log:

Tue 2011-05-03 15:16:31 +0300
0.390 bazaar version: 2.4b1
0.390 bzr arguments: [u'colo-mv', u'foo', u'.hidden/foo']
0.531 looking for plugins in C:\work\Bazaar\plugins
0.718 looking for plugins in C:/Program Files/Bazaar/plugins
0.718 Plugin name colo already loaded
0.718 Plugin name explorer already loaded
0.718 Plugin name qbzr already loaded
1.046 encoding stdout as sys.stdout encoding 'cp866'
1.156 Transferred: 0kB (0.0kB/s r:0kB w:0kB)
1.156 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:\work\Bazaar\plugins\colo\commands.py", line 450, in run
  File "bzrlib\transport\local.pyo", line 425, in move
  File "bzrlib\transport\__init__.pyo", line 302, in _translate_error
NoSuchFile: No such file: u'C:/Temp/1/.bzr/branches/foo': [Error 2] The system cannot find the file specified: u'C:/Temp/1/.bzr/branches/foo'

1.156 return code 3

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

But the branch has been moved successfully. So I think error message comes from some object that still thinks the branch at the old location.

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

That could be bug in bzr itself though. I see following code in bzrlib/transport/local.py:

    def move(self, rel_from, rel_to):
        """Move the item at rel_from to the location at rel_to"""
        path_from = self._abspath(rel_from)
        path_to = self._abspath(rel_to)

        try:
            # this version will delete the destination if necessary
            osutils.rename(path_from, path_to)
        except (IOError, OSError),e:
            # TODO: What about path_to?
            self._translate_error(e, path_from)

So, osutils.rename is actually succeed, but error anyway raised. Maybe some other code in colo keeps open handle to old directory and that prevents it to move the branch cleanly.

tags: added: win32
summary: - colo-mv prints with error message at the end
+ colo-mv prints error message at the end
Changed in bzr-colo:
status: New → Confirmed
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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