After bzr pump, "next" pipelines have a broken dirstate (got IndexError: list index out of range)

Bug #1030923 reported by Natalia Bidart
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
bzr-pipeline
Confirmed
Undecided
Unassigned

Bug Description

The following scenario makes it possible to reproduce the IndexError:

# branch lp:bzr-pipeline
nessita@dali:~/projects/test$ bzr branch lp:bzr-pipeline trunk
Branched 214 revisions.

# create a light weight checkout of trunk
nessita@dali:~/projects/test$ bzr checkout --lightweight trunk/ current

# create a pipeline to work with in the light checkout
nessita@dali:~/projects/test$ cd current/
nessita@dali:~/projects/test/current$ bzr pipes
* trunk
nessita@dali:~/projects/test/current$ bzr switch -b part-1
Tree is up to date at revision 214.
Switched to branch: /home/nessita/projects/test/part-1/

# make some modifications to commands.py and commit those changes
nessita@dali:~/projects/test/current$ bzr ci -m 'Some pep8 fixes.'
Committing to: /home/nessita/projects/test/part-1/
modified check-release.py
modified commands.py
Committed revision 215.

# push the changes somewhere
nessita@dali:~/projects/test/current$ bzr push lp:~nataliabidart/+junk/test-part-1
Created new branch.

# add a pipe
nessita@dali:~/projects/test/current$ bzr add-pipe part-2
Tree is up to date at revision 215.
Created and switched to pipe "part-2".

# make some modifications to loom.py and commit them
nessita@dali:~/projects/test/current$ bzr ci -m 'Some other pep8 fixes.'
Committing to: /home/nessita/projects/test/part-2/
modified loom.py
Committed revision 216.

# go to the previous pipe
nessita@dali:~/projects/test/current$ bzr switch-pipe :prev
Switched from "part-2" to "part-1".

# make some extra modifications to commands.py and commit
nessita@dali:~/projects/test/current$ bzr ci -m 'Fixed all pep8 errors in command.py.'
Committing to: /home/nessita/projects/test/part-1/
modified commands.py
Committed revision 216.

# push the latest changes
nessita@dali:~/projects/test/current$ bzr push
Using saved push location: bzr+ssh://bazaar.launchpad.net/~nataliabidart/+junk/test-part-1/
Pushed up to revision 216.

# pump the changes to the next pipe
nessita@dali:~/projects/test/current$ bzr pump

# switch to the next pipe
nessita@dali:~/projects/test/current$ bzr switch-pipe :next
Switched from "part-1" to "part-2".
nessita@dali:~/projects/test/current$ bzr log --limit 1 --line
217: Natalia B. Bidart 2012-07-30 [merge] Merged part-1 into part-2.

# boom, dirstate is broken
nessita@dali:~/projects/test/current$ bzr st
bzr: ERROR: exceptions.IndexError: list index out of range

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 920, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 1131, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 673, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 695, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 136, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 166, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 1148, in ignore_pipe
    result = func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/builtins.py", line 420, in run
    classify=not no_classify)
  File "/usr/lib/python2.7/dist-packages/bzrlib/status.py", line 175, in show_tree_status
    classify=classify)
  File "/usr/lib/python2.7/dist-packages/bzrlib/status.py", line 75, in report_changes
    want_unversioned=want_unversioned)
  File "/usr/lib/python2.7/dist-packages/bzrlib/tree.py", line 103, in changes_from
    want_unversioned=want_unversioned,
  File "/usr/lib/python2.7/dist-packages/bzrlib/decorators.py", line 155, in read_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/tree.py", line 1050, in compare
    want_unversioned=want_unversioned)
  File "/usr/lib/python2.7/dist-packages/bzrlib/delta.py", line 129, in _compare_trees
    want_unversioned=want_unversioned):
  File "_dirstate_helpers_pyx.pyx", line 1465, in bzrlib._dirstate_helpers_pyx.ProcessEntryC.__next__
  File "_dirstate_helpers_pyx.pyx", line 1577, in bzrlib._dirstate_helpers_pyx.ProcessEntryC._iter_next
  File "_dirstate_helpers_pyx.pyx", line 1155, in bzrlib._dirstate_helpers_pyx.ProcessEntryC._process_entry
IndexError: list index out of range

You can report this problem to Bazaar's developers by running
    apport-bug /var/crash/bzr.1000.2012-07-30T15:07.crash
if a bug-reporting window does not automatically appear.
nessita@dali:~/projects/test/current$

Revision history for this message
Natalia Bidart (nataliabidart) wrote :

Is worth noting that running:

nessita@dali:~/projects/test/current$ bzr repair-workingtree --force

fixes the error, until next bzr pump is run in previous pipes.

description: updated
summary: - After bzr pump, "next" pipelines have a broken dirstate
+ After bzr pump, "next" pipelines have a broken dirstate (got IndexError:
+ list index out of range)
Revision history for this message
Martin Packman (gz) wrote :

Minimised version of those instructions:

bzr init trunk
bzr commit --unchanged -m"r1 in trunk" trunk
bzr checkout --lightweight trunk current
cd current
bzr pipes
bzr switch -b part-1
bzr add-pipe part-2
bzr commit --unchanged -m"r2 in part-2"
bzr switch-pipe :prev
bzr commit --unchanged -m"r2 in part-1"
bzr pump
bzr switch-pipe :next
bzr st

Changed in bzr-pipeline:
status: New → Confirmed
Revision history for this message
Alberto Donato (ack) wrote :

This happens with versions in Zesty too

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.