Rev 4416: Move the boolean check to the first part of the if statement in http://bazaar.launchpad.net/~jameinel/bzr/1.16-chkmap-updates

John Arbash Meinel john at arbash-meinel.com
Fri Jun 5 20:58:25 BST 2009


At http://bazaar.launchpad.net/~jameinel/bzr/1.16-chkmap-updates

------------------------------------------------------------
revno: 4416
revision-id: john at arbash-meinel.com-20090605195715-q2gcpaypbixwk4wg
parent: john at arbash-meinel.com-20090605180340-3dqyamsptwix22m0
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 1.16-chkmap-updates
timestamp: Fri 2009-06-05 14:57:15 -0500
message:
  Move the boolean check to the first part of the if statement
-------------- next part --------------
=== modified file 'bzrlib/workingtree.py'
--- a/bzrlib/workingtree.py	2009-06-03 01:43:22 +0000
+++ b/bzrlib/workingtree.py	2009-06-05 19:57:15 +0000
@@ -451,7 +451,7 @@
             path = self.id2path(file_id)
         file_obj = self.get_file_byname(path, filtered=False)
         stat_value = _fstat(file_obj.fileno())
-        if self.supports_content_filtering() and filtered:
+        if filtered and self.supports_content_filtering():
             filters = self._content_filter_stack(path)
             file_obj = filtered_input_file(file_obj, filters)
         return (file_obj, stat_value)
@@ -462,7 +462,7 @@
     def get_file_byname(self, filename, filtered=True):
         path = self.abspath(filename)
         f = file(path, 'rb')
-        if self.supports_content_filtering() and filtered:
+        if filtered and self.supports_content_filtering():
             filters = self._content_filter_stack(filename)
             return filtered_input_file(f, filters)
         else:



More information about the bazaar-commits mailing list