merge: sort arguments to stabilize the ancestor search
authorMatt Mackall <mpm@selenic.com>
Mon, 21 Jun 2010 13:25:42 -0500
changeset 11418 67bb9d78f05e
parent 11417 6f1d1ed3e19a
child 11419 3cc2e34d7a7d
merge: sort arguments to stabilize the ancestor search
mercurial/ancestor.py
--- a/mercurial/ancestor.py	Sun Jun 20 14:21:56 2010 -0500
+++ b/mercurial/ancestor.py	Mon Jun 21 13:25:42 2010 -0500
@@ -19,6 +19,8 @@
     if a == b:
         return a
 
+    a, b = sorted([a, b])
+
     # find depth from root of all ancestors
     parentcache = {}
     visit = [a, b]