Rev 4799: If the filesystem has low resolution build_tree(['a', 'b']) in http://bazaar.launchpad.net/~jameinel/bzr/2.1.0b4-win32-test-suite

John Arbash Meinel john at arbash-meinel.com
Sun Nov 8 04:44:33 GMT 2009


At http://bazaar.launchpad.net/~jameinel/bzr/2.1.0b4-win32-test-suite

------------------------------------------------------------
revno: 4799
revision-id: john at arbash-meinel.com-20091108044423-es6gnn7wjh2aekfe
parent: john at arbash-meinel.com-20091108041625-t97xu97mammdhrls
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.1.0b4-win32-test-suite
timestamp: Sat 2009-11-07 22:44:23 -0600
message:
  If the filesystem has low resolution build_tree(['a', 'b'])
  can actually end up with the *same* values on win32. This is because
  we don't have 'st_ino' to distinguish files. They will be the same
  length because their content is similar (the filename is part of the
  content), and if the fs resolution is low enough, they can have the
  same timestamp. So instead, we use different name lengths to force
  the stat values to be different.
-------------- next part --------------
=== modified file 'bzrlib/tests/test_selftest.py'
--- a/bzrlib/tests/test_selftest.py	2009-11-01 05:41:57 +0000
+++ b/bzrlib/tests/test_selftest.py	2009-11-08 04:44:23 +0000
@@ -490,9 +490,9 @@
         self.assertEqualStat(real, fake)
 
     def test_assertEqualStat_notequal(self):
-        self.build_tree(["foo", "bar"])
+        self.build_tree(["foo", "longname"])
         self.assertRaises(AssertionError, self.assertEqualStat,
-            os.lstat("foo"), os.lstat("bar"))
+            os.lstat("foo"), os.lstat("longname"))
 
 
 class TestTestCaseWithMemoryTransport(tests.TestCaseWithMemoryTransport):



More information about the bazaar-commits mailing list