how to force recalculation of sha1 for versioned file?

John Arbash Meinel john at arbash-meinel.com
Mon Feb 11 17:48:21 GMT 2008


Vincent Ladeuil wrote:
>>>>>> "bialix" == Alexander Belchenko <bialix at ukr.net> writes:
> 
>     bialix> Aaron Bentley пишет:
>     >> Alexander Belchenko wrote:
>     >>> Unfortunately `bzr st` says that nothing changed. Because mount don't
>     >>> change
>     >>> timestamp nor size of this file.
>     >>> 
>     >>> It seems like this trick is fairly new, because back in November 2007
>     >>> I'm working with the same branch and don't have such problems.
>     >> 
>     >> No, this "trick" is not new.  Bazaar has used the mtime as an indicator
>     >> of whether a file has changed since bzr-0.0.5 in July 2005.
> 
>     bialix> So, let's assuming I have false memory.
> 
>     >>> I could understand this change should speed up status operation, but
>     >>> it seems like in my case bzr does the wrong thing.
>     >> 
>     >> If your disk image is being modified without having its mtime updated, I
>     >> would argue that's the wrong thing.  The mtime should always be updated
>     >> when the contents of a file change.
> 
> Imagine doing that for 8GB mounted images (as I mount regularly
> for virtual machines) ! 
> 
> Otherwise, yes, it's disturbing that the mtime is not updated.
> 
> I think they didn't want to impose a performance penalty by
> updating mtime each time time one of the files in the mounted
> volume was modified.
> 
>     bialix> Thank you. I will start to teach myself run `touch
>     bialix> firmware.bin` after each `umount`.
> 
> Only if md5 changes ! ;-)
> 
>      Vincent
> 

Well, if you touch it, then Bazaar will go out and re-read it to check the sha 
hash. And if it hasn't changed, then we will just update its last-known-valid mtime.

John
=:->




More information about the bazaar mailing list