diff mercurial/ancestor.py @ 11418:67bb9d78f05e

merge: sort arguments to stabilize the ancestor search
author Matt Mackall <mpm@selenic.com>
date Mon, 21 Jun 2010 13:25:42 -0500
parents d6512b3e9ac0
children 4f8067c94729
line wrap: on
line diff
--- 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]