unshelve failed to unshelve changes if file status changed from modified to added (merged)

Bug #612621 reported by Alexander Belchenko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned
Breezy
Triaged
Medium
Unassigned

Bug Description

C:\Temp>bzr colo-init 1

C:\Temp\1>echo foo > foo.txt

C:\Temp\1>bzr add && bzr ci -m1
adding foo.txt
Committing to: C:/Temp/1/.bzr/branches/trunk/
added foo.txt
Committed revision 1.

C:\Temp\1>bzr switch -b bar
Tree is up to date at revision 1.
Switched to branch: C:/Temp/1/.bzr/branches/bar/

C:\Temp\1>echo bar > bar.txt

C:\Temp\1>bzr add && bzr ci -m2
adding bar.txt
Committing to: C:/Temp/1/.bzr/branches/bar/
added bar.txt
Committed revision 2.

C:\Temp\1>echo spam >> bar.txt

C:\Temp\1>bzr st
modified:
  bar.txt

C:\Temp\1>bzr diff
=== modified file 'bar.txt'
--- bar.txt 2010-08-02 15:43:03 +0000
+++ bar.txt 2010-08-02 15:43:13 +0000
@@ -1,1 +1,2 @@
 bar
+spam

C:\Temp\1>bzr shelve --all
Selected changes:
 M bar.txt
Changes shelved with id "1".

C:\Temp\1>bzr switch trunk
Updated to revision 1.
Switched to branch: C:/Temp/1/.bzr/branches/trunk/

C:\Temp\1>bzr merge colo:bar
+N bar.txt
All changes applied successfully.

C:\Temp\1>bzr st
added:
  bar.txt
pending merge tips: (use -v to see all merge revisions)
  Alexander Belchenko 2010-08-02 2

C:\Temp\1>bzr shelve --list
  1: <no message>

C:\Temp\1>bzr unshelve
Using changes with id "1".
bzr: ERROR: exceptions.IndexError: list index out of range

Traceback (most recent call last):
  File "bzrlib\commands.pyo", line 853, in exception_to_return_code
  File "bzrlib\commands.pyo", line 1055, in run_bzr
  File "bzrlib\commands.pyo", line 661, in run_argv_aliases
  File "bzrlib\commands.pyo", line 665, in run_direct
  File "bzrlib\cleanup.pyo", line 122, in run_simple
  File "bzrlib\cleanup.pyo", line 156, in _do_with_cleanups
  File "bzrlib\builtins.pyo", line 5820, in run
  File "bzrlib\shelf_ui.pyo", line 469, in run
  File "bzrlib\shelf.pyo", line 401, in get_unshelver
  File "bzrlib\shelf.pyo", line 323, in from_tree_and_shelf
  File "bzrlib\transform.pyo", line 1054, in deserialize
  File "bzrlib\multiparent.pyo", line 167, in to_lines
  File "bzrlib\multiparent.pyo", line 502, in get_line_list
  File "bzrlib\multiparent.pyo", line 512, in cache_version
  File "bzrlib\multiparent.pyo", line 661, in reconstruct_version
  File "bzrlib\multiparent.pyo", line 654, in _reconstruct
IndexError: list index out of range

bzr 2.1.2 on python 2.5.4 (Windows-XP-5.1.2600-SP3)
arguments: ['C:\\Program Files\\Bazaar\\bzr.EXE', 'unshelve']
encoding: 'cp1251', fsenc: 'mbcs', lang: None
plugins:
  acad C:\work\Bazaar\plugins\acad [0.8.0]
  bzrtools C:\Program Files\Bazaar\plugins\bzrtools [2.1.0]
  colo C:\work\Bazaar\plugins\colo [0.2.0dev]
  explorer C:\work\Bazaar\plugins\explorer [1.1.0dev]
  format1 C:\work\Bazaar\plugins\format1 [unknown]
  launchpad C:\Program Files\Bazaar\plugins\launchpad [2.1.2]
  qbzr C:\work\Bazaar\plugins\qbzr [0.19.0dev3]
  rebase C:\Program Files\Bazaar\plugins\rebase [0.5.5]
  scmproj C:\work\Bazaar\plugins\scmproj [0.6.1]
  x_bit C:\work\Bazaar\plugins\x_bit [1.0.0]

*** Bazaar has encountered an internal error. This probably indicates a
    bug in Bazaar. You can help us fix it by filing a bug report at
        https://bugs.launchpad.net/bzr/+filebug
    including this traceback and a description of the problem.

But unshelve in the original branch (bar) worked as expected.

Jelmer Vernooij (jelmer)
tags: added: shelf
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

dupe of bug 514369?

tags: added: multiparent
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
Jelmer Vernooij (jelmer)
Changed in brz:
status: New → Triaged
importance: Undecided → Medium
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.