mercurial/ancestor.py
changeset 23333 9a2489015592
parent 23332 194508240dc9
child 23334 59e6e5dd3605
--- a/mercurial/ancestor.py	Fri Nov 14 11:33:52 2014 -0800
+++ b/mercurial/ancestor.py	Fri Nov 14 13:47:25 2014 -0800
@@ -148,13 +148,13 @@
 
     revsvisit = set(revs)
     basesvisit = set(bases)
-    if not revsvisit:
-        return []
     if not basesvisit:
         basesvisit.add(nullrev)
-    start = max(max(revsvisit), max(basesvisit))
     bothvisit = revsvisit.intersection(basesvisit)
     revsvisit.difference_update(bothvisit)
+    if not revsvisit:
+        return []
+    start = max(max(revsvisit), max(basesvisit))
     # At this point, we hold the invariants that:
     # - revsvisit is the set of nodes we know are an ancestor of at least one
     #   of the nodes in revs