Rev 4790: Small doc and code cleanups. in http://bazaar.launchpad.net/~jameinel/bzr/chk-index

John Arbash Meinel john at arbash-meinel.com
Wed Oct 28 14:05:11 GMT 2009


At http://bazaar.launchpad.net/~jameinel/bzr/chk-index

------------------------------------------------------------
revno: 4790
revision-id: john at arbash-meinel.com-20091028140503-z1it0dwzq2q14ssm
parent: john at arbash-meinel.com-20091028140223-6t12vddeff2xzyzc
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: chk-index
timestamp: Wed 2009-10-28 09:05:03 -0500
message:
  Small doc and code cleanups.
-------------- next part --------------
=== modified file 'bzrlib/chk_index.py'
--- a/bzrlib/chk_index.py	2009-10-28 14:02:23 +0000
+++ b/bzrlib/chk_index.py	2009-10-28 14:05:03 +0000
@@ -305,13 +305,13 @@
 
 
 def _bit_key_to_offset_0(bit_key):
+    # Always at offset 0
     return 0
 
 
 def _bit_key_to_offset_16(bit_key):
     # We want the first 4 bits
-    c = ord(bit_key[0])
-    return c >> 4
+    return ord(bit_key[0]) >> 4
 
 
 def _bit_key_to_offset_256(bit_key):
@@ -321,10 +321,12 @@
 
 _struct_H = Struct('>H')
 def _bit_key_to_offset_4096(bit_key):
+    # The first 12 bits
     return _struct_H.unpack(bit_key[:2])[0] >> 4
 
 
 def _bit_key_to_offset_65536(bit_key):
+    # The first 2 bytes
     return _struct_H.unpack(bit_key[:2])[0]
 
 



More information about the bazaar-commits mailing list