shelve problem on shelving directory with ignored file inside

Bug #611739 reported by Alexander Belchenko
34
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned
Breezy
Triaged
Medium
Unassigned

Bug Description

I don't think it's win32-related problem.

If I have added directory with ignored file inside and I want to shelve this directory I've got
bzr: ERROR: Tree transform is malformed [('missing parent', 'new-1')]

C:\Temp\1>bzr st
added:
  foo/bar/
  foo/bar/spam

C:\Temp\1>cd foo/bar
C:\Temp\1\foo\bar>

C:\Temp\1\foo\bar>echo > 1.~

C:\Temp\1\foo\bar>cd ../..
C:\Temp\1>

C:\Temp\1>bzr st
added:
  foo/bar/
  foo/bar/spam

C:\Temp\1>bzr ignored
foo/bar/1.~ *~

C:\Temp\1>bzr shelve --all
Selected changes:
-D foo/bar/
-D foo/bar/spam
bzr: ERROR: Tree transform is malformed [('missing parent', 'new-1')]

After that empty shelve item created:

C:\Temp\1>bzr st
added:
  foo/bar/
  foo/bar/spam

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

C:\Temp\1>bzr unshelve --dry-run
Using changes with id "1".

.bzr.log related to shelve --all:

0.235 bazaar version: 2.1.2
0.235 bzr arguments: [u'shelve', u'--all']
0.266 looking for plugins in C:\work\Bazaar\plugins
0.454 looking for plugins in C:/Program Files/Bazaar/plugins
0.485 encoding stdout as sys.stdout encoding 'cp866'
0.610 opening working tree 'C:/Temp/1'
[ 3020] 2010-07-30 18:18:49.203 INFO: Selected changes:
[ 3020] 2010-07-30 18:18:49.203 INFO: -D foo/bar/
[ 3020] 2010-07-30 18:18:49.203 INFO: -D foo/bar/spam
0.688 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 5770, in run
  File "bzrlib\shelf_ui.pyo", line 213, in run
  File "bzrlib\shelf.pyo", line 377, in shelve_changes
  File "bzrlib\shelf.pyo", line 251, in transform
  File "bzrlib\transform.pyo", line 1521, in apply
  File "bzrlib\transform.pyo", line 510, in _check_malformed
MalformedTransform: Tree transform is malformed [('missing parent', 'new-1')]

Related branches

description: updated
description: updated
Revision history for this message
Parth Malwankar (parthm) wrote :

I can confirm this also happens on Lucid with trunk.

[x]% bzr st
added:
  foo/bar/
  foo/bar/spam/
[x]% cd foo/bar
[bar]% echo "hello" > 1.~
[bar]% cd -
~/tmp/x
[x]% bzr st
added:
  foo/bar/
  foo/bar/spam/
[x]% bzr ignored
foo/bar/1.~ *~
[x]% bzr shelve --all
Selected changes:
-D foo/bar/
-D foo/bar/spam/
bzr: ERROR: Tree transform is malformed [('missing parent', 'new-1')]
[x]% bzr version --short
2.3.0dev1
[x]%

Jelmer Vernooij (jelmer)
tags: added: shelf treetransform
Revision history for this message
Didier Barvaux (didier-barvaux) wrote :

I encounter that bug too with the following Bzr version:

$ bzr --version
Bazaar (bzr) 2.5.1
  Python interpreter: /usr/bin/python2.7 2.7.3
  Python standard library: /usr/lib/python2.7
  Platform: Linux-3.3.6-i686-Intel-R-_Core-TM-2_CPU_T5500_@_1.66GHz-with-gentoo-2.1
  bzrlib: /usr/lib/python2.7/site-packages/bzrlib

Revision history for this message
Daniel Clemente (n142857) wrote :

An easy way to reproduce it:

cd /tmp/; rm -rf bzr01; mkdir bzr01; cd bzr01; bzr init .; mkdir dir; touch dir/song.mp3; bzr ignore '*.mp3'; bzr add dir; bzr status; bzr shelve --all

Revision history for this message
Daniel Clemente (n142857) wrote :

I created a test for this bug, it's in lp:~n142857/+junk/shelving-directory-with-ignored . Please merge it with bzr

Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
Revision history for this message
Jelmer Vernooij (jelmer) wrote :
Changed in brz:
status: New → Triaged
importance: Undecided → Medium
tags: added: traceback
removed: check-for-breezy
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.