mercurial/dispatch.py
branchstable
changeset 17228 d1b49b02bc16
parent 16933 30143c3dd102
child 17299 e51d4aedace9
--- a/mercurial/dispatch.py	Thu Jul 19 16:50:52 2012 +0200
+++ b/mercurial/dispatch.py	Thu Jul 19 21:20:56 2012 +0200
@@ -225,8 +225,9 @@
                 break
             if compare not in testedwith.split() and testedwith != 'internal':
                 tested = [tuplever(v) for v in testedwith.split()]
-                nearest = max([t for t in tested if t < ct])
-                if nearest < worst[1]:
+                lower = [t for t in tested if t < ct]
+                nearest = max(lower or tested)
+                if worst[0] is None or nearest < worst[1]:
                     worst = name, nearest, report
         if worst[0] is not None:
             name, testedwith, report = worst