Delta not showing modifications sometimes

Daniel Silverstone dsilvers at digital-scurf.org
Tue Nov 15 18:27:27 GMT 2005


Hi,

I noticed today while hacking on some code which is kept under bzr, that
when you do the following:

(output elided where irrelevant)

$ mkdir foo
$ cd foo
$ bzr init
$ echo one > foo
$ bzr add foo
$ bzr commit -m "add foo"
$ echo two > foo
$ bzr status
modified:
  foo
$ bzr mv foo bar
$ bzr status
renamed:
  foo => bar
$ bzr diff
=== renamed file 'foo' => 'bar'
--- foo
+++ bar
@@ -1,1 +1,1 @@
-one
+two

See how status doesn't indicate there's any modifications and yet there
are.

This appears to be down to how delta.py's compare_trees assembles the
TreeDelta instance. In that it says "if renamed, elif modified, elif
want unchanged"

Is this by design, a mistake, a desirable side-effect, or what?

Regards,

Daniel

-- 
Daniel Silverstone                         http://www.digital-scurf.org/
PGP mail accepted and encouraged.            Key Id: 2BC8 4016 2068 7895






More information about the bazaar mailing list