Failing WT case_sensitive test on Windows

John Arbash Meinel john at arbash-meinel.com
Sat Jan 22 19:10:42 UTC 2011


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

I just realized why the WT2 case_sensitive test is failing. The test is
done here:

    def _detect_case_handling(self):
        wt_trans = self.bzrdir.get_workingtree_transport(None)
        try:
            wt_trans.stat("FoRMaT")
        except errors.NoSuchFile:
            self.case_sensitive = True
        else:
            self.case_sensitive = False


So it is checking for a "format" file in the WT control directory.
However the all-in-one WT doesn't have a "format" file. It only has
"branch-format". Put another way, WT3&4 look at:

 .bzr/checkout/format

But WT2 only has
 .bzr/branch-format

There isn't a .bzr/format file to look for.

The test passes on Linux, because it assumes that if the "FoRMaT" file
can't be found, it is because it is miss capitalized, not because it is
completely gone.

This fixes it, but I'm not 100% happy with it:

=== modified file 'bzrlib/workingtree.py'
- --- bzrlib/workingtree.py       2011-01-19 20:04:23 +0000
+++ bzrlib/workingtree.py       2011-01-22 19:09:36 +0000
@@ -2707,6 +2707,17 @@
         if self._inventory is None:
             self.read_working_inventory()

+    def _detect_case_handling(self):
+        wt_trans = self.bzrdir.get_workingtree_transport(None)
+        try:
+            wt_trans.stat("Branch-FoRMaT")
+        except errors.NoSuchFile:
+            self.case_sensitive = True
+        else:
+            self.case_sensitive = False
+
+        self._setup_directory_is_tree_reference()
+
     def _get_check_refs(self):
         """Return the references needed to perform a check of this tree."""
         return [('trees', self.last_revision())]


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

iEYEARECAAYFAk07K7IACgkQJdeBCYSNAAN0FQCfQuiwAgR2Svlj/zAh0dxFYbPC
zUQAoLcXa0SIfCNuBDOKKkh4ThawVENh
=VZSi
-----END PGP SIGNATURE-----



More information about the bazaar mailing list