merging into a new branch leaves working tree in bad state (bzr: ERROR: exceptions.ValueError: WorkingTree.set_root_id with fileid=None)

Bug #785377 reported by Chris Osborn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned

Bug Description

I created a new branch with "bzr init branchname", then within the resulting directory used "bzr merge path" to merge in an existing branch. This appeared to work, but subsequent calls to "bzr status" reported "working tree is out of date, run 'bzr update'". Doing so produced this trace:

Traceback (most recent call last):
  File "/Library/Python/2.6/site-packages/bzrlib/commands.py", line 926, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/Library/Python/2.6/site-packages/bzrlib/commands.py", line 1126, in run_bzr
    ret = run(*run_argv)
  File "/Library/Python/2.6/site-packages/bzrlib/commands.py", line 691, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/Library/Python/2.6/site-packages/bzrlib/commands.py", line 713, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/Library/Python/2.6/site-packages/bzrlib/cleanup.py", line 135, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/Library/Python/2.6/site-packages/bzrlib/cleanup.py", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/Library/Python/2.6/site-packages/bzrlib/builtins.py", line 1433, in run
    show_base=show_base)
  File "/Library/Python/2.6/site-packages/bzrlib/workingtree.py", line 2312, in update
    return self._update_tree(old_tip, change_reporter, revision, show_base)
  File "/Library/Python/2.6/site-packages/bzrlib/mutabletree.py", line 50, in tree_write_locked
    return unbound(self, *args, **kwargs)
  File "/Library/Python/2.6/site-packages/bzrlib/workingtree.py", line 2369, in _update_tree
    self.set_root_id(to_root_id)
  File "/Library/Python/2.6/site-packages/bzrlib/mutabletree.py", line 50, in tree_write_locked
    return unbound(self, *args, **kwargs)
  File "/Library/Python/2.6/site-packages/bzrlib/workingtree.py", line 2225, in set_root_id
    'WorkingTree.set_root_id with fileid=None')
ValueError: WorkingTree.set_root_id with fileid=None

bzr 2.3.1 on python 2.6.1 (Darwin-10.7.0-i386-64bit)
arguments: ['/usr/local/bin/bzr', 'update']
encoding: 'UTF-8', fsenc: 'utf-8', lang: 'en_US.UTF-8'
plugins:
  bash_completion /Library/Python/2.6/site-packages/bzrlib/plugins/bash_completion [2.3.1]
  bzrp4 /Library/Python/2.6/site-packages/bzrlib/plugins/bzrp4 [unknown]
  bzrtools /Library/Python/2.6/site-packages/bzrlib/plugins/bzrtools [2.3.1]
  colo /Library/Python/2.6/site-packages/bzrlib/plugins/colo [0.2.1]
  email /Library/Python/2.6/site-packages/bzrlib/plugins/email [unknown]
  explorer /Library/Python/2.6/site-packages/bzrlib/plugins/explorer [1.1.2]
  extmerge /Library/Python/2.6/site-packages/bzrlib/plugins/extmerge [unknown]
  fastimport /Users/csosborn/.bazaar/plugins/fastimport [0.10.0]
  keychain /Library/Python/2.6/site-packages/bzrlib/plugins/keychain [0.1.0]
  launchpad /Library/Python/2.6/site-packages/bzrlib/plugins/launchpad [2.3.1]
  loom /Library/Python/2.6/site-packages/bzrlib/plugins/loom [2.2.1dev]
  netrc_credential_store /Library/Python/2.6/site-packages/bzrlib/plugins/netrc_credential_store [2.3.1]
  news_merge /Library/Python/2.6/site-packages/bzrlib/plugins/news_merge [2.3.1]
  pipeline /Library/Python/2.6/site-packages/bzrlib/plugins/pipeline [1.1.0]
  qbzr /Library/Python/2.6/site-packages/bzrlib/plugins/qbzr [0.20.0]
  rewrite /Library/Python/2.6/site-packages/bzrlib/plugins/rewrite [0.6.2]
  svn /Library/Python/2.6/site-packages/bzrlib/plugins/svn [1.0.5dev]
  upload /Library/Python/2.6/site-packages/bzrlib/plugins/upload [1.0.1dev]
  xmloutput /Library/Python/2.6/site-packages/bzrlib/plugins/xmloutput [0.8.7.dev]

"bzr status" also shows odd output, including the following nonsensical rename:

$ bzr status
working tree is out of date, run 'bzr update'
renamed:
  .bzrignore => .bzrignore

Revision history for this message
Martin Packman (gz) wrote :

Probably a duplicate of bug 82555 but the traceback is fun, maybe the recent fix to bug 242175 will help?

Steps to repo:

$ bzr init tmp1
Created a standalone tree (format: 2a)
$ touch tmp1/file
$ bzr add tmp1
adding file
$ bzr commit -m "Adding file" tmp1
Committing to: /.../tmp1/
added file
Committed revision 1.
$ bzr init tmp2
Created a standalone tree (format: 2a)
$ bzr merge -d tmp2 tmp1
+N file
All changes applied successfully.
$ bzr st tmp2
working tree is out of date, run 'bzr update'
renamed:
  file => file
$ bzr update tmp2
bzr: ERROR: exceptions.ValueError: WorkingTree.set_root_id with fileid=None
...

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