Comment 6 for bug 120968

Revision history for this message
James Westby (james-w) wrote : Re: TypeError: sequence item 1: expected string, NoneType found

On (14/09/07 16:54), Martin Pool wrote:
> This is https://bugs.launchpad.net/bzr/+bug/120968 "bzr update" in
> checkout of empty branch fails and breaks dirstate

The sequence at the top now fails with the following error instead:

All changes applied successfully.
bzr: ERROR: bzrlib.errors.ReservedId: Reserved revision-id {null:}

Traceback (most recent call last):
  File "/home/jw2328/devel/bzr/bzr.dev/bzrlib/commands.py", line 800, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/home/jw2328/devel/bzr/bzr.dev/bzrlib/commands.py", line 758, in run_bzr
    ret = run(*run_argv)
  File "/home/jw2328/devel/bzr/bzr.dev/bzrlib/commands.py", line 492, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/home/jw2328/devel/bzr/bzr.dev/bzrlib/builtins.py", line 1039, in run
    possible_transports=possible_transports)
  File "/home/jw2328/devel/bzr/bzr.dev/bzrlib/workingtree.py", line 2061, in update
    return self._update_tree(old_tip, change_reporter)
  File "/home/jw2328/devel/bzr/bzr.dev/bzrlib/mutabletree.py", line 50, in tree_write_locked
    return unbound(self, *args, **kwargs)
  File "/home/jw2328/devel/bzr/bzr.dev/bzrlib/workingtree.py", line 2119, in _update_tree
    self.set_parent_trees(parent_trees)
  File "/home/jw2328/devel/bzr/bzr.dev/bzrlib/mutabletree.py", line 50, in tree_write_locked
    return unbound(self, *args, **kwargs)
  File "/home/jw2328/devel/bzr/bzr.dev/bzrlib/workingtree_4.py", line 1099, in set_parent_trees
    _mod_revision.check_not_reserved_id(rev_id)
  File "/home/jw2328/devel/bzr/bzr.dev/bzrlib/revision.py", line 451, in check_not_reserved_id
    raise errors.ReservedId(revision_id)
ReservedId: Reserved revision-id {null:}

presumably with Aaron's null: changes.

Here is a testcase to exercise this bug:

=== modified file 'bzrlib/tests/blackbox/test_update.py'
--- bzrlib/tests/blackbox/test_update.py 2007-08-08 02:01:10 +0000
+++ bzrlib/tests/blackbox/test_update.py 2007-09-14 16:36:30 +0000
@@ -210,3 +210,11 @@
                                                    lightweight=True)
         tree.commit('empty commit')
         self.run_bzr('update checkout')
+
+ def test_update_checkout_of_empty_branch(self):
+ """Run update in a checkout of an empty branch: #438137."""
+ tree = self.make_branch_and_tree('branch')
+ checkout = tree.branch.create_checkout('checkout', lightweight=False)
+ checkout.commit('empty commit', local=True)
+ self.run_bzr('update checkout')
+

--
  James Westby -- GPG Key ID: B577FE13 -- http://jameswestby.net/
  seccure key - (3+)k7|M*edCX/.A:n*N!>|&7U.L#9E)Tu)T0>AM - secp256r1/nistp256