Show More
@@ -52,7 +52,7 b' def gettype(q):' | |||||
52 | def offset_type(offset, type): |
|
52 | def offset_type(offset, type): | |
53 | return long(long(offset) << 16 | type) |
|
53 | return long(long(offset) << 16 | type) | |
54 |
|
54 | |||
55 | nullhash = _sha(nullid) |
|
55 | _nullhash = _sha(nullid) | |
56 |
|
56 | |||
57 | def hash(text, p1, p2): |
|
57 | def hash(text, p1, p2): | |
58 | """generate a hash from the given text and its parent hashes |
|
58 | """generate a hash from the given text and its parent hashes | |
@@ -64,7 +64,7 b' def hash(text, p1, p2):' | |||||
64 | # As of now, if one of the parent node is null, p2 is null |
|
64 | # As of now, if one of the parent node is null, p2 is null | |
65 | if p2 == nullid: |
|
65 | if p2 == nullid: | |
66 | # deep copy of a hash is faster than creating one |
|
66 | # deep copy of a hash is faster than creating one | |
67 | s = nullhash.copy() |
|
67 | s = _nullhash.copy() | |
68 | s.update(p1) |
|
68 | s.update(p1) | |
69 | else: |
|
69 | else: | |
70 | # none of the parent nodes are nullid |
|
70 | # none of the parent nodes are nullid |
General Comments 0
You need to be logged in to leave comments.
Login now