InconsistentDelta error when moving a modified file

Bug #470202 reported by PhiLho
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
High
Unassigned

Bug Description

As reported on mailing list ("Strange error on move operation", Sun, 01 Nov 2009 10:49:39 +0100, Message-ID: <hcjljk$n3k$<email address hidden>>)

> bzr version
Bazaar (bzr) 2.0.0
  Python interpreter: C:\PrgCmdLine\Bazaar\python25.dll 2.5.4
  Python standard library: C:\PrgCmdLine\Bazaar\lib\library.zip
  Platform: Windows-XP-5.1.2600-SP3

Branch upgraded from some previous version to 2.0 recently.

Using Windows Explorer on XP, I created a pair of directories and moved some files there.
I tried to move them automatically:

> bzr st
removed:
  _SmallPrograms/ClockHands-1.svg
  _SmallPrograms/ClockHands-2.svg
  _SmallPrograms/CompactCrystalClock.fx
  _SmallPrograms/CrystalClock.fx
  _SmallPrograms/Gear.fx
  _SmallPrograms/Gears.fx
  _SmallPrograms/GimpGradient.fx
  _SmallPrograms/ShowGimpGradients.fx
unknown:
  _SmallPrograms/Gears/
  _SmallPrograms/GimpGradients/

D:\_PhiLhoSoft\JavaFX
> bzr mv --auto
_SmallPrograms => _SmallPrograms/Gears
_SmallPrograms/GimpGradient.fx => _SmallPrograms/GimpGradients/GimpGradient.fx
_SmallPrograms/ShowGimpGradients.fx => _SmallPrograms/GimpGradients/ShowGimpGradients.fx
bzr: ERROR: An inconsistent delta was supplied involving u'_SmallPrograms/GimpGradients/GimpGradient.fx', 'gimpgradient.fx-20091028182342-x927rrgvo2w0l0vy-1'
reason: Missing parent

Ouch. Perhaps I made a mistake, but it isn't a very friendly message...

Log trace:

dim. 2009-11-01 10:36:40 +0100
0.156 bzr arguments: [u'mv', u'--auto']
0.171 looking for plugins in D:/_PhiLhoDocs/Settings/bazaar/2.0/plugins
0.312 looking for plugins in C:/PrgCmdLine/Bazaar/plugins
0.312 Plugin name xmloutput already loaded
0.437 encoding stdout as sys.stdout encoding 'cp850'
0.500 opening working tree 'D:/_PhiLhoSoft/JavaFX'
[ 3496] 2009-11-01 10:36:41.171 INFO: _SmallPrograms => _SmallPrograms/Gears
[ 3496] 2009-11-01 10:36:41.171 INFO: _SmallPrograms/GimpGradient.fx => _SmallPrograms/GimpGradients/GimpGradient.fx
[ 3496] 2009-11-01 10:36:41.171 INFO: _SmallPrograms/ShowGimpGradients.fx => _SmallPrograms/GimpGradients/ShowGimpGradients.fx
0.796 Not saving DirState because _changes_aborted is set.
0.796 Not saving DirState because _changes_aborted is set.
0.812 Traceback (most recent call last):
  File "bzrlib\commands.pyo", line 842, in exception_to_return_code
  File "bzrlib\commands.pyo", line 1037, in run_bzr
  File "bzrlib\commands.pyo", line 654, in run_argv_aliases
  File "bzrlib\builtins.pyo", line 798, in run
  File "bzrlib\builtins.pyo", line 822, in run_auto
  File "bzrlib\rename_map.pyo", line 244, in guess_renames
  File "bzrlib\mutabletree.pyo", line 52, in tree_write_locked
  File "bzrlib\workingtree_4.pyo", line 1251, in apply_inventory_delta
  File "bzrlib\dirstate.pyo", line 1355, in update_by_delta
  File "bzrlib\dirstate.pyo", line 1414, in _apply_insertions
InconsistentDelta: An inconsistent delta was supplied involving u'_SmallPrograms/GimpGradients/GimpGradient.fx', 'gimpgradient.fx-20091028182342-x927rrgvo2w0l0vy-1'
reason: Missing parent

0.812 return code 3

I solved the issue:

> bzr add --no-recurse _SmallPrograms/Gears/ _SmallPrograms/GimpGradients/
adding _SmallPrograms/Gears
adding _SmallPrograms/GimpGradients

D:\_PhiLhoSoft\JavaFX
> bzr mv --auto
_SmallPrograms/ClockHands-1.svg => _SmallPrograms/Gears/ClockHands-1.svg
_SmallPrograms/ClockHands-2.svg => _SmallPrograms/Gears/ClockHands-2.svg
_SmallPrograms/CompactCrystalClock.fx => _SmallPrograms/Gears/CompactCrystalClock.fx
_SmallPrograms/CrystalClock.fx => _SmallPrograms/Gears/CrystalClock.fx
_SmallPrograms/Gear.fx => _SmallPrograms/Gears/Gear.fx
_SmallPrograms/Gears.fx => _SmallPrograms/Gears/Gears.fx
_SmallPrograms/GimpGradient.fx => _SmallPrograms/GimpGradients/GimpGradient.fx
_SmallPrograms/ShowGimpGradients.fx => _SmallPrograms/GimpGradients/ShowGimpGradients.fx

but I thought it was worth reporting it...
Additional info: the GimpGradient.fx file was modified and not commited.

I reproduced it in a small test repository:

> bzr init ShowBug
Created a standalone tree (format: 2a)

> cd ShowBug

> bzr add
adding AppDesc.java
adding RunApp.java
adding StreamGobbler.java

> bzr commit -m "Initial commit"
Committing to: D:/Temp/TestBzr/ShowBug/
added AppDesc.java
added RunApp.java
added StreamGobbler.java
Committed revision 1.

> bzr st
modified:
  RunApp.java

> bzr commit -m "Little change"
Committing to: D:/Temp/TestBzr/ShowBug/
modified RunApp.java
Committed revision 2.

> mkdir Sub

> bzr st
modified:
  RunApp.java
unknown:
  Sub/

> mv RunApp.java Sub

> mv AppDesc.java Sub

> bzr st
removed:
  AppDesc.java
  RunApp.java
unknown:
  Sub/

> bzr mv --auto
 => Sub
bzr: ERROR: An inconsistent delta was supplied involving u'', 'tree_root-20091102073420-u5vzyao9oi0yvk9t-1'
reason: This parent is not present.

> bzr add --no-recurse Sub
adding Sub

> bzr mv --auto
AppDesc.java => Sub/AppDesc.java
RunApp.java => Sub/RunApp.java

Log trace:

lun. 2009-11-02 08:34:19 +0100
0.156 bzr arguments: [u'init', u'ShowBug']
0.172 looking for plugins in D:/_PhiLhoDocs/Settings/bazaar/2.0/plugins
0.312 looking for plugins in C:/PrgCmdLine/Bazaar/plugins
0.312 Plugin name xmloutput already loaded
0.422 encoding stdout as sys.stdout encoding 'cp850'
0.500 creating repository in file:///D:/Temp/TestBzr/ShowBug/.bzr/.
0.547 creating branch <bzrlib.branch.BzrBranchFormat7 object at 0x01316FB0> in file:///D:/Temp/TestBzr/ShowBug/.bzr/
0.594 opening working tree 'D:/Temp/TestBzr/ShowBug'
0.656 opening working tree 'D:/Temp/TestBzr/ShowBug'
0.672 return code 0

lun. 2009-11-02 08:34:51 +0100
0.140 bzr arguments: [u'add']
0.156 looking for plugins in D:/_PhiLhoDocs/Settings/bazaar/2.0/plugins
0.296 looking for plugins in C:/PrgCmdLine/Bazaar/plugins
0.296 Plugin name xmloutput already loaded
0.406 encoding stdout as sys.stdout encoding 'cp850'
0.468 opening working tree 'D:/Temp/TestBzr/ShowBug'
0.484 skip control directory '.bzr'
0.531 return code 0

lun. 2009-11-02 08:35:05 +0100
0.141 bzr arguments: [u'commit', u'-m', u'Initial commit']
0.157 looking for plugins in D:/_PhiLhoDocs/Settings/bazaar/2.0/plugins
0.297 looking for plugins in C:/PrgCmdLine/Bazaar/plugins
0.297 Plugin name xmloutput already loaded
0.422 encoding stdout as sys.stdout encoding 'cp850'
0.485 opening working tree 'D:/Temp/TestBzr/ShowBug'
0.532 preparing to commit
[ 4028] 2009-11-02 08:35:06.375 INFO: Committing to: D:/Temp/TestBzr/ShowBug/
0.532 Selecting files for commit with filter None
[ 4028] 2009-11-02 08:35:06.390 INFO: added AppDesc.java
[ 4028] 2009-11-02 08:35:06.405 INFO: added RunApp.java
[ 4028] 2009-11-02 08:35:06.405 INFO: added StreamGobbler.java
[ 4028] 2009-11-02 08:35:06.483 INFO: Committed revision 1.
0.641 return code 0

lun. 2009-11-02 08:35:29 +0100
0.125 bzr arguments: [u'st']
0.156 looking for plugins in D:/_PhiLhoDocs/Settings/bazaar/2.0/plugins
0.281 looking for plugins in C:/PrgCmdLine/Bazaar/plugins
0.281 Plugin name xmloutput already loaded
0.406 encoding stdout as sys.stdout encoding 'cp850'
0.453 opening working tree 'D:/Temp/TestBzr/ShowBug'
0.468 check paths: None
0.484 return code 0

lun. 2009-11-02 08:35:38 +0100
0.141 bzr arguments: [u'commit', u'-m', u'Little change']
0.156 looking for plugins in D:/_PhiLhoDocs/Settings/bazaar/2.0/plugins
0.281 looking for plugins in C:/PrgCmdLine/Bazaar/plugins
0.281 Plugin name xmloutput already loaded
0.406 encoding stdout as sys.stdout encoding 'cp850'
0.469 opening working tree 'D:/Temp/TestBzr/ShowBug'
0.484 preparing to commit
[ 2956] 2009-11-02 08:35:39.108 INFO: Committing to: D:/Temp/TestBzr/ShowBug/
0.500 Selecting files for commit with filter None
[ 2956] 2009-11-02 08:35:39.125 INFO: modified RunApp.java
[ 2956] 2009-11-02 08:35:39.217 INFO: Committed revision 2.
0.625 return code 0

lun. 2009-11-02 08:36:20 +0100
0.141 bzr arguments: [u'st']
0.156 looking for plugins in D:/_PhiLhoDocs/Settings/bazaar/2.0/plugins
0.297 looking for plugins in C:/PrgCmdLine/Bazaar/plugins
0.297 Plugin name xmloutput already loaded
0.406 encoding stdout as sys.stdout encoding 'cp850'
0.469 opening working tree 'D:/Temp/TestBzr/ShowBug'
0.469 check paths: None
0.500 return code 0

lun. 2009-11-02 08:36:42 +0100
0.141 bzr arguments: [u'st']
0.157 looking for plugins in D:/_PhiLhoDocs/Settings/bazaar/2.0/plugins
0.297 looking for plugins in C:/PrgCmdLine/Bazaar/plugins
0.297 Plugin name xmloutput already loaded
0.407 encoding stdout as sys.stdout encoding 'cp850'
0.469 opening working tree 'D:/Temp/TestBzr/ShowBug'
0.485 check paths: None
0.500 return code 0

lun. 2009-11-02 08:37:00 +0100
0.141 bzr arguments: [u'mv', u'--auto']
0.156 looking for plugins in D:/_PhiLhoDocs/Settings/bazaar/2.0/plugins
0.281 looking for plugins in C:/PrgCmdLine/Bazaar/plugins
0.281 Plugin name xmloutput already loaded
0.406 encoding stdout as sys.stdout encoding 'cp850'
0.469 opening working tree 'D:/Temp/TestBzr/ShowBug'
[ 3052] 2009-11-02 08:37:00.875 INFO: => Sub
0.531 Not saving DirState because _changes_aborted is set.
0.531 Not saving DirState because _changes_aborted is set.
0.531 Traceback (most recent call last):
  File "bzrlib\commands.pyo", line 842, in exception_to_return_code
  File "bzrlib\commands.pyo", line 1037, in run_bzr
  File "bzrlib\commands.pyo", line 654, in run_argv_aliases
  File "bzrlib\builtins.pyo", line 798, in run
  File "bzrlib\builtins.pyo", line 822, in run_auto
  File "bzrlib\rename_map.pyo", line 244, in guess_renames
  File "bzrlib\mutabletree.pyo", line 52, in tree_write_locked
  File "bzrlib\workingtree_4.pyo", line 1251, in apply_inventory_delta
  File "bzrlib\dirstate.pyo", line 1357, in update_by_delta
  File "bzrlib\dirstate.pyo", line 1710, in _after_delta_check_parents
InconsistentDelta: An inconsistent delta was supplied involving u'', 'tree_root-20091102073420-u5vzyao9oi0yvk9t-1'
reason: This parent is not present.

0.531 return code 3

lun. 2009-11-02 08:38:10 +0100
0.140 bzr arguments: [u'add', u'--no-recurse', u'Sub']
0.156 looking for plugins in D:/_PhiLhoDocs/Settings/bazaar/2.0/plugins
0.281 looking for plugins in C:/PrgCmdLine/Bazaar/plugins
0.281 Plugin name xmloutput already loaded
0.406 encoding stdout as sys.stdout encoding 'cp850'
0.469 opening working tree 'D:/Temp/TestBzr/ShowBug'
0.500 return code 0

lun. 2009-11-02 08:38:19 +0100
0.125 bzr arguments: [u'mv', u'--auto']
0.140 looking for plugins in D:/_PhiLhoDocs/Settings/bazaar/2.0/plugins
0.281 looking for plugins in C:/PrgCmdLine/Bazaar/plugins
0.281 Plugin name xmloutput already loaded
0.421 encoding stdout as sys.stdout encoding 'cp850'
0.484 opening working tree 'D:/Temp/TestBzr/ShowBug'
[ 3440] 2009-11-02 08:38:19.780 INFO: AppDesc.java => Sub/AppDesc.java
[ 3440] 2009-11-02 08:38:19.780 INFO: RunApp.java => Sub/RunApp.java
0.531 return code 0

Martin Pool (mbp)
Changed in bzr:
status: New → Fix Committed
importance: Undecided → High
summary: - Bad error message when moving a modified file
+ InconsistentDelta error when moving a modified file
Changed in bzr:
status: Fix Committed → 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.