Rev 3822: Switch back to 255-way fan out. in http://bzr.arbash-meinel.com/branches/bzr/brisbane/hack
John Arbash Meinel
john at arbash-meinel.com
Tue Dec 23 23:52:07 GMT 2008
At http://bzr.arbash-meinel.com/branches/bzr/brisbane/hack
------------------------------------------------------------
revno: 3822
revision-id: john at arbash-meinel.com-20081223235152-2kvb00nzjp076ls1
parent: john at arbash-meinel.com-20081223235053-2zcki62ikvtadozq
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: hack
timestamp: Tue 2008-12-23 17:51:52 -0600
message:
Switch back to 255-way fan out.
-------------- next part --------------
=== modified file 'bzrlib/chk_map.py'
--- a/bzrlib/chk_map.py 2008-12-23 23:50:53 +0000
+++ b/bzrlib/chk_map.py 2008-12-23 23:51:52 +0000
@@ -719,16 +719,16 @@
crc = zlib.crc32(bit)
# knit.add_lines() doesn't like it when we have an extra '\n' in
# the line. So we force '\n' out by mapping it to another char.
- # hashed = struct.pack('>i', crc).replace('\n', '_')
- # assert len(hashed) == 4
- # hashed_bits.append(hashed)
- # hex(-number) == -hex(number) which isn't really what we want
- if crc < 0:
- hashed = '%08X' % (-crc,)
- else:
- hashed = '%08X' % (crc,)
- assert len(hashed) == 8
+ hashed = struct.pack('>i', crc).replace('\n', '_')
+ assert len(hashed) == 4
hashed_bits.append(hashed)
+ ## # hex(-number) == -hex(number) which isn't really what we want
+ ## if crc < 0:
+ ## hashed = '%08X' % (-crc,)
+ ## else:
+ ## hashed = '%08X' % (crc,)
+ ## assert len(hashed) == 8
+ ## hashed_bits.append(hashed)
return '\x00'.join(hashed_bits)
def refs(self):
@@ -1043,16 +1043,16 @@
hashed_bits = []
for bit in key:
crc = zlib.crc32(bit)
- # hashed = struct.pack('>i', crc).replace('\n', '_')
- # assert len(hashed) == 4
- # hashed_bits.append(hashed)
- # hex(-number) == -hex(number) which isn't really what we want
- if crc < 0:
- hashed = '%08X' % (-crc,)
- else:
- hashed = '%08X' % (crc,)
- assert len(hashed) == 8
+ hashed = struct.pack('>i', crc).replace('\n', '_')
+ assert len(hashed) == 4
hashed_bits.append(hashed)
+ ## # hex(-number) == -hex(number) which isn't really what we want
+ ## if crc < 0:
+ ## hashed = '%08X' % (-crc,)
+ ## else:
+ ## hashed = '%08X' % (crc,)
+ ## assert len(hashed) == 8
+ ## hashed_bits.append(hashed)
return '\x00'.join(hashed_bits)[:self._node_width]
# return ('\x00'.join(key) + '\x00'*self._node_width)[:self._node_width]
More information about the bazaar-commits
mailing list