push fails rename missed file in target working tree

Bug #82369 reported by Alexander Belchenko
2
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Undecided
Aaron Bentley

Bug Description

Both branches should be on local disk, for push try to update working tree.
To reproduce bug you need to delete manually some file in target branch,
and in source branch rename this file to another name. Commit changes in source branch.
Don't commit in target branch.
Then try to push from source to target. Push fails with error:
NoSuchFile: No such file: XXX

When run status command in target branch after this push, bzr suggest to run update command.
Running update -- and you get the same error. Below is actual traceback:

bzr arguments: [u'update']
looking for plugins in D:\USER\python\bzr\bzr.dev\bzrlib\plugins
Plugin name __init__ already loaded
Plugin name __init__ already loaded
looking for plugins in C:/WINDOWS/Application Data/bazaar/2.0/plugins
encoding stdout as sys.stdout encoding 'cp866'
opening working tree 'D:/USER/python/bzr/bzr.dev'
got branch format Bazaar-NG Metadir branch format 5
Traceback (most recent call last):
  File "D:\USER\python\bzr\bzr.dev\bzrlib\commands.py", line 650, in run_bzr_catch_errors
    return run_bzr(argv)
  File "D:\USER\python\bzr\bzr.dev\bzrlib\commands.py", line 612, in run_bzr
    ret = run(*run_argv)
  File "D:\USER\python\bzr\bzr.dev\bzrlib\commands.py", line 304, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "D:\USER\python\bzr\bzr.dev\bzrlib\builtins.py", line 899, in run
    conflicts = tree.update()
  File "D:\USER\python\bzr\bzr.dev\bzrlib\workingtree.py", line 1774, in update
    return self._update_tree(old_tip)
  File "D:\USER\python\bzr\bzr.dev\bzrlib\mutabletree.py", line 34, in tree_write_locked
    return unbound(self, *args, **kwargs)
  File "D:\USER\python\bzr\bzr.dev\bzrlib\workingtree.py", line 1810, in _update_tree
    this_tree=self)
  File "D:\USER\python\bzr\bzr.dev\bzrlib\merge.py", line 960, in merge_inner
    return merger.do_merge()
  File "D:\USER\python\bzr\bzr.dev\bzrlib\merge.py", line 270, in do_merge
    merge = self.merge_type(pb=self._pb, **kwargs)
  File "D:\USER\python\bzr\bzr.dev\bzrlib\merge.py", line 387, in __init__
    file_status = self.merge_contents(file_id)
  File "D:\USER\python\bzr\bzr.dev\bzrlib\merge.py", line 630, in merge_contents
    return contents_conflict()
  File "D:\USER\python\bzr\bzr.dev\bzrlib\merge.py", line 575, in contents_conflict
    self.tt.delete_contents(trans_id)
  File "D:\USER\python\bzr\bzr.dev\bzrlib\transform.py", line 328, in delete_contents
    self.tree_kind(trans_id)
  File "D:\USER\python\bzr\bzr.dev\bzrlib\transform.py", line 385, in tree_kind
    return file_kind(self._tree.abspath(path))
  File "D:\USER\python\bzr\bzr.dev\bzrlib\osutils.py", line 133, in file_kind
    raise errors.NoSuchFile(f)
NoSuchFile: No such file: u'D:/USER/python/bzr/bzr.dev/bzrlib/win32console.py'

return code 3

Comments from Aaron:

Okay, I think I see the cause of the bug: contents_conflict is
incorrectly assuming that it should delete the file if it has a file-id,
whether or not the file exists on disk.

I don't expect this will be hard to fix.

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

Confirmed by Aaron in mailing list.

Changed in bzr:
status: Unconfirmed → Confirmed
Aaron Bentley (abentley)
Changed in bzr:
assignee: nobody → aaron-bentley
status: Confirmed → Fix Released
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.