Rev 4530: Don't trust the file content length to tell us if the content has really changed. in http://bazaar.launchpad.net/~jameinel/bzr/1.17-content-filtering-commit

John Arbash Meinel john at arbash-meinel.com
Tue Aug 18 18:49:37 BST 2009


At http://bazaar.launchpad.net/~jameinel/bzr/1.17-content-filtering-commit

------------------------------------------------------------
revno: 4530
revision-id: john at arbash-meinel.com-20090818174925-bvwyzz52n70wvig5
parent: pqm at pqm.ubuntu.com-20090714204235-ii82khmazuonuxja
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 1.17-content-filtering-commit
timestamp: Tue 2009-08-18 12:49:25 -0500
message:
  Don't trust the file content length to tell us if the content has really changed.
  It doesn't work when content filtering is active.
-------------- next part --------------
=== modified file 'bzrlib/repository.py'
--- a/bzrlib/repository.py	2009-07-02 23:10:53 +0000
+++ b/bzrlib/repository.py	2009-08-18 17:49:25 +0000
@@ -464,9 +464,9 @@
             if content_summary[2] is None:
                 raise ValueError("Files must not have executable = None")
             if not store:
-                if (# if the file length changed we have to store:
-                    parent_entry.text_size != content_summary[1] or
-                    # if the exec bit has changed we have to store:
+                # We can't trust a check of the file length because of content
+                # filtering...
+                if (# if the exec bit has changed we have to store:
                     parent_entry.executable != content_summary[2]):
                     store = True
                 elif parent_entry.text_sha1 == content_summary[3]:



More information about the bazaar-commits mailing list