No way to disable stat-cache usage when dealing with timestamp-preserving edits.

Bug #519091 reported by HgParadox
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Wishlist
Unassigned

Bug Description

Bazaar (bzr) 2.0.4 and also Bazaar Explorer 0.8.3 fail to detect changes made to any binary file.
In this case, the files in question are .png and .ogg
bzr status shows only source or text files that were modified.
if I delete the above .png or .ogg file, then a bzr status does show that the file has been

test of the ogg file,
original (part of the header)
4F67675300020000 OggS....
then changed to
3A67675300020000 :ggS....

bzr status shows nothing modified!
delete said file, and bzr status shows
removed:
  data/.../p407.ogg (the same file above)

Looks like a serious bug to me.

This is on windows XP SP 3

Revision history for this message
Martin Pool (mbp) wrote :

This is pretty strange. Can you please attach to this bug some zip files of an entire tree where this has happened, including the .bzr directory, both before and after your change?

tags: added: win32
Changed in bzr:
status: New → Incomplete
Revision history for this message
Vincent Ladeuil (vila) wrote :

That sounds highly suspicious, can you try 'bzr status' or 'bzr diff' in that directory
from the command-line and report whether bzr itself notices the changes.

If that's the case, we'll re-assign the bug to bzr-explorer.

Revision history for this message
HgParadox (hgparadox) wrote :

Martin, this is a pretty big project, the .bzr directory itself is over 814MB

Vincent,
bzr status returns nothing.
bzr diff returns nothing.
after deleting said file, bzr status shows
removed:
  data/music/track1.ogg

revert the change, bzr status shows nothing (as it should)
use hex editor to modify file, and bzr status & bzr diff still show nothing.

It doesn't make a difference if I use command line bzr or bazaar explorer, they both report the same thing.

still trying to find the problem, will keep you informed.

Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 519091] Re: doesn't detect modifications to "binary" files

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sparks wrote:
> Martin, this is a pretty big project, the .bzr directory itself is over
> 814MB
>
> Vincent,
> bzr status returns nothing.
> bzr diff returns nothing.
> after deleting said file, bzr status shows
> removed:
> data/music/track1.ogg
>
> revert the change, bzr status shows nothing (as it should)
> use hex editor to modify file, and bzr status & bzr diff still show nothing.
>
> It doesn't make a difference if I use command line bzr or bazaar
> explorer, they both report the same thing.
>
> still trying to find the problem, will keep you informed.
>

Do you know if the hex editor tries to avoid changing the last-modified
time of the file? If you copy the updated version to another filename,
delete the original and move the updated version back, does 'bzr status'
notice?

It is *possible* for a file which hasn't changed in length, and has the
exact same mtime to show up as 'not-interesting' because the stat value
matches what we have stored. Otherwise we would have to read the
contents of every file for every 'bzr status' run, which would be
horribly slow.

By copying it to a new file and renaming it, I think we can weed that
change out.

What hex editor are you using?

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAktxuQ8ACgkQJdeBCYSNAAO64ACfQZk2NdVmQhuiFQrbO2mNN2M9
2y4An2pAquVavfeoszH+4dsxOIo/zwfx
=i58U
-----END PGP SIGNATURE-----

Revision history for this message
HgParadox (hgparadox) wrote : Re: doesn't detect modifications to "binary" files

Hi John,

It does seem that the file modification date doesn't change with the hex editor I am using (Hex Workshop) when it writes the file back. ::sigh::

Well, thanks for your help, you can now close this bug report as invalid / external issue.

Sorry about the noise. :(

Needless to say, I have deleted that hex editor.

John A Meinel (jameinel)
Changed in bzr:
status: Incomplete → Invalid
Revision history for this message
Matthew Fuller (fullermd) wrote : Re: [Bug 519091] Re: doesn't detect modifications to "binary" files

> Otherwise we would have to read the contents of every file for every
> 'bzr status' run, which would be horribly slow.

It may still be useful to have a 'bzr stat --paranoid' that DOES do
that, for use in special cases.

Revision history for this message
Robert Collins (lifeless) wrote :

 status confirmed
 importance wishlist
 summary "No way to disable stat-cache usage when dealing with timestamp-preserving edits."

summary: - doesn't detect modifications to "binary" files
+ No way to disable stat-cache usage when dealing with timestamp-
+ preserving edits.
Changed in bzr:
importance: Undecided → Wishlist
status: Invalid → Confirmed
Jelmer Vernooij (jelmer)
tags: added: 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.