[BUG] bogus name_version in bzr.newformat

John A Meinel john at arbash-meinel.com
Tue Oct 4 02:59:08 BST 2005


Robert Collins wrote:
> On Mon, 2005-10-03 at 15:56 -0500, John A Meinel wrote:
>
>>After upgrading the bzr.newformat tree into the new format, I was
>>playing around with it, and I noticed that it seems to be updating the
>>"name_version" field even if the name did not change.
>>
>>I realize, we may be getting rid of this field, and changing it to
>>"revision" for just the last changed version.
>>
>>The specific file I noticed was "adoption.txt". As near as I can tell,
>>the actual name doesn't change, and neither does the parent (perhaps the
>>parent of the parent changes???) The text_sha1 doesn't ever change, and
>>the text_version seems to agree.
>>
>>So why would the name_version be changing?
>
>
> It should change if the parent or the name changes. Anyway, that field
> is nukified in my format-5 tree - could you see if it happens there ?
>

Why should it change if the parent changes? I understand that if it has
a new parent (so it is renamed into a new directory) but if you just
rename its parent, shouldn't it stay the same.

For example these should change it:
$wd/           $wd/
  dir1/          dir1/
    a.txt   =>     b.txt
  dir2/          dir2/
    b.txt          b.txt

$wd/           $wd/
  dir1/          dir1/
    a.txt   =>
  dir2/          dir2/
                   a.txt
    b.txt          b.txt

But this shouldn't:

$wd/           $wd/
  dir1/          dir3/
    a.txt   =>     a.txt
  dir2/          dir2/
    b.txt          b.txt

Or should it? The full path does change, I'm just skeptical that it is
important.

The big reason that I bring it up, is because the file "adoption.txt"
has name_version change about 60 times with no change to the text_sha1
hash. And __init__.py has it change almost 120 times with one hash, and
then another 72 times with a different hash.

The file "bzr" changes 61 times, and that is in the root directory.

Now, I'm measuring changes as last_changed = max(text_version,
name_version), so it is possible that the text_version changed, but it
shouldn't, since the text_sha1 hash is identical.

I will play with your branch, though.

John
=:->

> Rob
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 253 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051003/49927314/attachment.pgp 


More information about the bazaar mailing list