mercurial/revlog.py
changeset 33391 943b8c37f49d
parent 33260 85d1ac011582
child 33392 ac6446611ad2
--- a/mercurial/revlog.py	Mon Jul 03 13:49:03 2017 +0200
+++ b/mercurial/revlog.py	Mon Jul 10 16:39:28 2017 -0400
@@ -152,10 +152,14 @@
         s.update(p1)
     else:
         # none of the parent nodes are nullid
-        l = [p1, p2]
-        l.sort()
-        s = hashlib.sha1(l[0])
-        s.update(l[1])
+        if p1 < p2:
+            a = p1
+            b = p2
+        else:
+            a = p2
+            b = p1
+        s = hashlib.sha1(a)
+        s.update(b)
     s.update(text)
     return s.digest()