--- 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]