##// END OF EJS Templates
revlog: micro-optimize the computation of hashes...
Alex Gaynor -
r33391:943b8c37 default
parent child Browse files
Show More
@@ -152,10 +152,14 b' def hash(text, p1, p2):'
152 s.update(p1)
152 s.update(p1)
153 else:
153 else:
154 # none of the parent nodes are nullid
154 # none of the parent nodes are nullid
155 l = [p1, p2]
155 if p1 < p2:
156 l.sort()
156 a = p1
157 s = hashlib.sha1(l[0])
157 b = p2
158 s.update(l[1])
158 else:
159 a = p2
160 b = p1
161 s = hashlib.sha1(a)
162 s.update(b)
159 s.update(text)
163 s.update(text)
160 return s.digest()
164 return s.digest()
161
165
General Comments 0
You need to be logged in to leave comments. Login now